/* =========================================================
   南开大学附属中学 · 官网样式
   基调：白色；主色取自校徽青莲紫 #8A1472；不使用渐变
   层次：深色首屏 → 白色内容“幕布”上滑覆盖 → 校徽紫页脚从下方显露
   ========================================================= */
:root {
  --purple: #8a1472;        /* 校徽主色 */
  --purple-deep: #5e0d4e;
  --purple-soft: #f3e8f0;   /* 浅紫底色 */
  --purple-line: rgba(138, 20, 114, 0.28);
  --ink: #1a0b16;           /* 首屏深色 */
  --paper: #ffffff;
  --paper-2: #f7f5f3;       /* 极浅暖灰，用于卡片/占位 */
  --silver: #b9b6b1;        /* 取自校徽银色描边 */
  --text: #1d1419;
  --muted: rgba(29, 20, 25, 0.6);
  --line: rgba(29, 20, 25, 0.12);
  --light: #f6f2f4;
  --muted-light: rgba(246, 242, 244, 0.66);
  --line-light: rgba(246, 242, 244, 0.18);

  --oct: polygon(50% 0%, 64.65% 14.64%, 85.36% 14.64%, 85.36% 35.35%, 100% 50%, 85.36% 64.65%, 85.36% 85.36%, 64.65% 85.36%, 50% 100%, 35.35% 85.36%, 14.64% 85.36%, 14.64% 64.65%, 0% 50%, 14.64% 35.35%, 14.64% 14.64%, 35.35% 14.64%);

  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --en: "Cormorant Garamond", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;

  --pad: clamp(20px, 5vw, 80px);
  --radius-sheet: clamp(24px, 3vw, 44px);
  --ease: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-variant-numeric: lining-nums;
  background: var(--purple);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--purple); color: #fff; }
svg use { fill: currentColor; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(96px, 12vw, 180px) 0; position: relative; }

.tag {
  display: inline-block;
  font-family: var(--en);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* 栏目标签：编号置于八角星中（八角星取自校徽） */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; letter-spacing: 0.2em;
  color: var(--purple);
  margin-bottom: clamp(28px, 4vw, 56px);
}
.eyebrow span {
  font-family: var(--en); font-size: 15px; font-weight: 600; color: #fff;
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--purple);
  clip-path: var(--oct);
}

.h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 84px);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

/* split helpers */
.split-line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.split-char { display: inline-block; will-change: transform; }

/* =========================================================
   Loader
   ========================================================= */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 56px;
  clip-path: inset(0 0 0 0);
}
.loader__mark { position: relative; width: clamp(140px, 18vw, 210px); aspect-ratio: 1; display: grid; place-items: center; }
.loader__oct { position: absolute; left: -24%; top: -24%; width: 148%; height: 148%; overflow: visible; }
.loader__oct polygon { fill: none; stroke: var(--purple); stroke-width: .5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.loader__emblem { width: 100%; height: 100%; opacity: 0; transform: scale(.7) rotate(-30deg); }
.loader__title { display: flex; align-items: center; gap: 18px; font-family: var(--serif); font-weight: 600; font-size: clamp(16px, 1.6vw, 22px); letter-spacing: .5em; color: var(--text); }
.loader__title span { opacity: 0; }
.loader__title i { width: 10px; height: 10px; background: var(--purple); clip-path: var(--oct); }
.loader__meta {
  position: absolute; left: var(--pad); right: var(--pad); bottom: 44px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 13px; letter-spacing: 0.3em; color: var(--muted);
}
.loader__count { font-family: var(--en); font-size: clamp(48px, 7vw, 96px); letter-spacing: 0; color: var(--purple); line-height: 1; }
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--purple-soft); }
.loader__bar i { display: block; height: 100%; width: 100%; background: var(--purple); transform-origin: left; transform: scaleX(0); }

/* =========================================================
   Cursor
   ========================================================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 99; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor__dot { width: 6px; height: 6px; background: #fff; }
.cursor__ring {
  width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.75);
  display: grid; place-items: center;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), background-color .3s, border-color .3s;
}
.cursor__label { font-size: 12px; letter-spacing: .1em; color: #000; opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cursor.is-hover .cursor__ring { width: 60px; height: 60px; }
.cursor.is-label .cursor__ring { width: 84px; height: 84px; background: #fff; border-color: #fff; }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-label .cursor__dot { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* =========================================================
   Progress bar
   ========================================================= */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--purple); transform-origin: left; transform: scaleX(0); }

/* =========================================================
   Header（电脑端：校徽 + 胶囊导航 + 行动按钮）
   ========================================================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 20px var(--pad);
  color: var(--text);
  transition: transform .6s var(--ease), padding .5s var(--ease), color .4s;
}
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  opacity: 0; transition: opacity .4s, background-color .4s, border-color .4s;
}
.header.is-scrolled { padding-top: 10px; padding-bottom: 10px; }
.header.is-scrolled::before { opacity: 1; }
.header.is-hidden { transform: translateY(-110%); }
.header.is-dark { color: var(--light); }
.header.is-dark::before { background: rgba(26, 11, 22, .55); border-color: var(--line-light); }

.brand { display: flex; align-items: center; gap: 14px; justify-self: start; min-width: 0; }
.brand__emblem { width: 48px; height: 48px; flex: none; transition: transform 1s var(--ease), width .5s var(--ease), height .5s var(--ease); }
.header.is-scrolled .brand__emblem { width: 40px; height: 40px; }
.brand:hover .brand__emblem { transform: rotate(-360deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand__text strong { font-family: var(--serif); font-size: 17px; letter-spacing: .12em; }
.brand__text em { font-family: var(--en); font-style: normal; font-size: 12px; letter-spacing: .05em; opacity: .62; }

.nav {
  position: relative; display: flex; align-items: center; gap: 2px;
  padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(29, 20, 25, .06);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.header.is-dark .nav { background: rgba(255, 255, 255, .07); border-color: var(--line-light); box-shadow: none; }
.header.is-scrolled .nav { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav a {
  position: relative; z-index: 1;
  padding: 9px 18px; border-radius: 999px;
  font-size: 14px; letter-spacing: .08em; white-space: nowrap;
  opacity: .78; transition: opacity .3s, color .3s;
}
.nav a:hover { opacity: 1; }
.nav a.is-active { opacity: 1; color: var(--purple); font-weight: 600; }
.header.is-dark .nav a.is-active { color: #fff; }
.nav__pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0;
  border-radius: 999px; background: var(--purple-soft);
  opacity: 0; pointer-events: none;
  transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .3s, background-color .4s;
}
.header.is-dark .nav__pill { background: rgba(255, 255, 255, .14); }

.header__actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px;
  background: var(--purple); color: #fff; font-size: 14px; letter-spacing: .1em; white-space: nowrap;
  transition: background-color .3s, color .3s;
}
.cta:hover { background: var(--purple-deep); }
.cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .4s var(--ease-out); }
.cta:hover svg { transform: translateX(3px); }
.header.is-dark .cta { background: #fff; color: var(--purple); }
.header.is-dark .cta:hover { background: var(--purple-soft); }

.menu-btn { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid currentColor; position: relative; }
.menu-btn span { position: absolute; left: 14px; right: 14px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.menu-btn span:nth-child(1) { top: 19px; }
.menu-btn span:nth-child(2) { top: 26px; }
body.menu-open .menu-btn span:nth-child(1) { top: 22px; transform: rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 1360px) { .brand__text em { display: none; } }
@media (max-width: 1180px) {
  .header { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .menu-btn { display: block; }
}
@media (max-width: 560px) { .cta { display: none; } .brand__text strong { font-size: 15px; } }

/* overlay menu */
.overlay { position: fixed; inset: 0; z-index: 45; pointer-events: none; visibility: hidden; }
.overlay__bg { position: absolute; inset: 0; background: var(--purple); clip-path: circle(0% at 95% 5%); }
.overlay__nav { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--pad); gap: 2vh; }
.overlay__nav a {
  font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 8vw, 72px); line-height: 1.15; color: #fff;
  display: flex; align-items: baseline; gap: 18px; overflow: hidden;
}
.overlay__nav a i { font-family: var(--en); font-style: normal; font-size: 16px; opacity: .6; }
.overlay__foot { position: absolute; bottom: 32px; left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.75); }
body.menu-open .overlay { pointer-events: auto; visibility: visible; }
body.menu-open .header { color: #fff; }
body.menu-open .header::before { opacity: 0; }

/* =========================================================
   层次：首屏在下，白色内容“幕布”在上，页脚在最底层
   ========================================================= */
main { position: relative; z-index: 1; }
.sheet {
  position: relative; z-index: 2;
  margin-top: calc(-1 * var(--radius-sheet));
  background: var(--paper);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: 0 -24px 60px rgba(26, 11, 22, .28);
}
body.footer-reveal .sheet { border-radius: var(--radius-sheet); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; z-index: 1; height: 100vh; height: 100svh; min-height: 620px;
  background: var(--ink); color: var(--light);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px var(--pad) calc(48px + var(--radius-sheet));
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__oct {
  position: absolute; left: 50%; top: 43%; width: min(84vh, 80vw); height: min(84vh, 80vw);
  margin: calc(min(84vh, 80vw) / -2) 0 0 calc(min(84vh, 80vw) / -2);
  overflow: visible; pointer-events: none;
}
.hero__oct use { fill: none; stroke: rgba(246, 242, 244, .1); stroke-width: .25; }
.hero__grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(3%, -6%); }
  60% { transform: translate(-7%, 2%); } 80% { transform: translate(4%, 5%); } 100% { transform: translate(0, 0); }
}
.hero__top, .hero__bottom { position: relative; z-index: 2; pointer-events: none; }
.hero__top { display: flex; justify-content: space-between; }
.hero__phrase { text-transform: none; }
.hero__phrase-index { font-weight: 600; color: #fff; }
.hero__phrase-name { font-family: var(--serif); letter-spacing: .3em; margin-left: 10px; }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.hero__title { font-weight: 400; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .split {
  display: block; font-family: var(--serif); font-weight: 900;
  font-size: clamp(38px, 7vw, 116px); line-height: 1.1; letter-spacing: .06em;
}
.hero__en { margin-top: 10px; }
.hero__en .split-en { display: block; font-family: var(--en); font-style: italic; font-size: clamp(16px, 2vw, 28px); color: var(--silver); }
.hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: 28px; text-align: right; font-size: 13px; letter-spacing: .14em; color: var(--muted-light); }
.scroll-cue { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--light); }
.scroll-cue span { writing-mode: vertical-rl; letter-spacing: .4em; font-size: 12px; }
.scroll-cue svg { width: 18px; height: 60px; fill: none; stroke: currentColor; stroke-width: 1; }
.scroll-cue line { stroke-dasharray: 58; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { stroke-dashoffset: 58; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -58; } }
@media (max-width: 760px) {
  .hero__bottom { flex-direction: column; align-items: flex-start; }
  .hero__side { align-items: flex-start; text-align: left; flex-direction: row; justify-content: space-between; width: 100%; }
  .hero__phrase-name { display: none; }
}

/* =========================================================
   About
   ========================================================= */
.about__statement {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(24px, 3.3vw, 52px); line-height: 1.55; letter-spacing: .02em;
  max-width: 23em;
}
.about__statement .w { opacity: .14; }
.about__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); margin-top: clamp(64px, 9vw, 130px); border-top: 1px solid var(--line); padding-top: 40px; }
.about__col h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 14px; color: var(--purple); letter-spacing: .1em; }
.about__col p { color: var(--muted); font-size: 15px; }
.about__color { display: flex; gap: 14px; align-items: flex-start; }
.about__color i { flex: none; width: 44px; height: 44px; background: var(--purple); clip-path: var(--oct); }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }

/* =========================================================
   Emblem
   ========================================================= */
.emblem { padding-top: 0; }
.emblem__wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 140px); align-items: center; }
.emblem__visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; max-width: 560px; width: 100%; justify-self: center; }
.emblem__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.emblem__ring use { fill: none; stroke: var(--purple-line); stroke-width: .35; }
.emblem__ring--b use { stroke: var(--line); }
.emblem__img { position: relative; width: 62%; filter: drop-shadow(0 24px 40px rgba(94, 13, 78, .22)); }
.emblem__list { list-style: none; margin-top: 40px; counter-reset: em; }
.emblem__list li { counter-increment: em; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 22px 0; border-top: 1px solid var(--line); }
.emblem__list li:last-child { border-bottom: 1px solid var(--line); }
.emblem__list li::before { content: "0" counter(em); grid-row: span 2; font-family: var(--en); font-size: 20px; color: var(--purple); line-height: 1.5; }
.emblem__list b { font-family: var(--serif); font-size: clamp(18px, 1.6vw, 22px); }
.emblem__list p { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  .emblem__wrap { grid-template-columns: 1fr; }
  .emblem__visual { max-width: 380px; }
}

/* =========================================================
   Motto
   ========================================================= */
.motto { position: relative; }
.motto__pin { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 120px); align-items: center; padding: 110px var(--pad); max-width: 1440px; margin: 0 auto; }
.motto__left { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.motto__scroll {
  width: min(340px, 66vw); aspect-ratio: 474 / 691;
  background: #fff; padding: 22px; border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(29, 20, 25, .1);
  clip-path: inset(0 0 100% 0);
}
.motto__scroll img { width: 100%; height: 100%; object-fit: contain; }
.motto__note { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.motto__words { position: relative; min-height: 330px; }
.motto__word { position: absolute; top: 0; left: 0; right: 0; opacity: 0; pointer-events: none; }
.motto__word.is-active { pointer-events: auto; }
.motto__words.is-static .motto__word { position: relative; opacity: 1; margin-bottom: 40px; }
.motto__char {
  display: block; font-family: var(--serif); font-weight: 900;
  font-size: clamp(80px, 10.5vw, 170px); line-height: 1; color: var(--purple);
}
.motto__word h3 { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 32px); margin: 18px 0 12px; letter-spacing: .1em; }
.motto__word p { color: var(--muted); max-width: 30em; }
.motto__dots { display: flex; gap: 12px; margin-top: 8px; }
.motto__dots i { width: 12px; height: 12px; background: var(--line); clip-path: var(--oct); transition: background-color .4s, transform .4s var(--ease-out); }
.motto__dots i.is-on { background: var(--purple); transform: scale(1.3); }
.motto__words.is-static + .motto__dots { display: none; }
.motto__ethos { list-style: none; margin-top: 40px; border-top: 1px solid var(--line); }
.motto__ethos li { padding: 16px 0; border-bottom: 1px solid var(--line); font-family: var(--serif); letter-spacing: .14em; display: flex; gap: 24px; }
.motto__ethos em { font-style: normal; color: var(--purple); font-size: 13px; min-width: 3em; }
@media (max-width: 900px) {
  .motto__pin { grid-template-columns: 1fr; }
  .motto__words { min-height: 380px; }
}

/* =========================================================
   Unveil
   ========================================================= */
.unveil { height: 100vh; position: relative; overflow: hidden; }
.unveil__frame { position: absolute; inset: 0; clip-path: inset(16% 20% 16% 20% round 28px); will-change: clip-path; }
.unveil__frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); will-change: transform; }
.unveil__frame::after { content: ""; position: absolute; inset: 0; background: rgba(26, 11, 22, .38); }
.unveil__caption { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: clamp(40px, 7vw, 90px); display: grid; grid-template-columns: 1fr minmax(0, 420px); align-items: end; gap: 32px; color: #fff; opacity: 0; }
.unveil__caption .tag { grid-column: 1 / -1; }
.unveil__caption h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 6.2vw, 100px); line-height: 1.08; }
.unveil__caption p { color: rgba(255,255,255,.86); font-size: 15px; }
@media (max-width: 760px) { .unveil__caption { grid-template-columns: 1fr; } }

/* =========================================================
   Stats
   ========================================================= */
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 44px 28px 44px 0; border-bottom: 1px solid var(--line); position: relative; }
.stat:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.stat b { font-family: var(--en); font-weight: 400; font-size: clamp(64px, 8vw, 128px); line-height: 1; letter-spacing: -.02em; }
.stat sup { font-family: var(--serif); font-size: 18px; margin-left: 6px; color: var(--purple); vertical-align: top; position: relative; top: .6em; }
.stat span { display: block; margin-top: 18px; color: var(--muted); font-size: 14px; letter-spacing: .08em; }
.stat::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--purple); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
.stat:hover::before { transform: scaleX(1); }
@media (max-width: 860px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
}

/* =========================================================
   History (horizontal)
   ========================================================= */
.history { overflow: hidden; padding-top: clamp(40px, 6vw, 80px); }
.history__head { margin-bottom: 20px; }
.history__pin { height: 100vh; display: flex; align-items: center; }
.history__track { width: max-content; display: flex; gap: clamp(40px, 6vw, 120px); padding: 0 var(--pad); will-change: transform; }
.era { flex: none; width: clamp(300px, 34vw, 520px); position: relative; }
.era__year {
  font-family: var(--en); font-weight: 600; font-size: clamp(90px, 12vw, 200px); line-height: .85;
  color: transparent; -webkit-text-stroke: 1.2px var(--purple);
  margin-bottom: -0.32em; position: relative; z-index: 2;
}
.era__media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--paper-2); position: relative; }
.era__media img { width: 120%; max-width: none; height: 100%; object-fit: cover; will-change: transform; }
.era__media--type { display: grid; place-items: center; background: var(--purple); }
.era__media--type svg { position: absolute; width: 74%; height: 74%; left: 13%; top: 13%; overflow: visible; }
.era__media--type svg use { fill: none; stroke: rgba(255,255,255,.25); stroke-width: .5; }
.era__media--type span { position: relative; font-family: var(--serif); font-weight: 900; font-size: clamp(44px, 4.6vw, 76px); line-height: 1.15; color: #fff; text-align: center; letter-spacing: .1em; }
.era__text { padding-top: 24px; }
.era__text h3 { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 28px); margin-bottom: 8px; }
.era__text p { color: var(--muted); font-size: 15px; }
.era__text small { display: block; margin-top: 10px; font-size: 12px; color: rgba(29,20,25,.45); }
.era--end { align-self: center; width: clamp(260px, 26vw, 380px); }
.era__emblem { width: 120px; height: 120px; }
.era::before { content: ""; position: absolute; left: 0; right: calc(-1 * clamp(40px, 6vw, 120px)); top: calc(clamp(90px, 12vw, 200px) * .42); height: 1px; background: var(--line); z-index: 0; }
.era--end::before { display: none; }

/* =========================================================
   Curriculum
   ========================================================= */
.axis { position: relative; max-width: 900px; margin: clamp(40px, 6vw, 80px) auto; aspect-ratio: 800 / 420; }
.axis__svg { width: 100%; height: 100%; overflow: visible; }
.axis__line, .axis__wing { fill: none; stroke: var(--purple); stroke-width: 2; stroke-linecap: round; }
.axis__wing--thin { stroke-width: 1; stroke-dasharray: 4 6; opacity: .6; }
.axis__node { color: var(--purple); }
.axis__label { position: absolute; display: flex; flex-direction: column; gap: 4px; }
.axis__label span { font-family: var(--en); font-size: 13px; letter-spacing: .2em; color: var(--purple); }
.axis__label strong { font-family: var(--serif); font-size: clamp(16px, 2.2vw, 30px); }
.axis__label em { font-style: normal; font-size: 13px; color: var(--muted); }
.axis__label--center { left: 0; right: 0; top: -6%; text-align: center; align-items: center; }
.axis__label--center strong { background: var(--paper); padding: 0 14px; }
.axis__label--left { left: 0; top: 56%; }
.axis__label--right { right: 0; top: 56%; text-align: right; align-items: flex-end; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(40px, 6vw, 80px); }
.tier { border: 1px solid var(--line); border-radius: 18px; padding: 36px 32px; position: relative; overflow: hidden; transition: color .5s, border-color .5s; isolation: isolate; background: #fff; }
.tier::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--purple); transform: translateY(101%); transition: transform .7s var(--ease); }
.tier:hover { color: #fff; border-color: var(--purple); }
.tier:hover::before { transform: translateY(0); }
.tier:hover p, .tier:hover i { color: #fff; }
.tier i { font-family: var(--en); font-style: italic; font-size: 48px; color: var(--purple); line-height: 1; transition: color .5s; }
.tier h3 { font-family: var(--serif); font-size: 24px; margin: 18px 0 10px; }
.tier p { color: var(--muted); font-size: 15px; transition: color .5s; }
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr; }
  .axis__label strong { font-size: 15px; }
  .axis__label--left, .axis__label--right { top: 62%; }
}

/* =========================================================
   Campus / facilities
   ========================================================= */
.campus__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: clamp(48px, 6vw, 90px); }
.campus__intro { max-width: 22em; color: var(--muted); }
.fac-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; perspective: 1000px; }
.fac {
  position: relative; border-radius: 20px; padding: 32px 28px; min-height: 240px;
  background: var(--paper-2); border: 1px solid transparent;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
  transform-style: preserve-3d; transition: border-color .4s, background-color .4s, box-shadow .4s;
}
.fac:hover { background: #fff; border-color: var(--purple-line); box-shadow: 0 24px 48px rgba(94, 13, 78, .1); }
.fac--wide { grid-column: span 2; }
.fac__icon { position: absolute; top: 28px; left: 28px; font-size: 26px; color: var(--purple); transform: translateZ(40px); }
.fac__num { position: absolute; top: 22px; left: 28px; font-family: var(--en); font-size: clamp(48px, 5vw, 84px); line-height: 1; color: var(--purple); transform: translateZ(50px); }
.fac h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 8px; transform: translateZ(30px); }
.fac p { font-size: 14px; color: var(--muted); transform: translateZ(20px); }
@media (max-width: 1080px) { .fac-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .fac-grid { grid-template-columns: 1fr; }
  .fac--wide { grid-column: auto; }
  .campus__head { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   Life
   ========================================================= */
.life__wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.life__media { position: sticky; top: 110px; }
.life__img { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 200px 200px 12px 12px; }
.life__img img { width: 100%; height: 120%; object-fit: cover; }
.life__media small { display: block; margin-top: 14px; color: var(--muted); font-size: 13px; }
.life .h2 { font-size: clamp(32px, 4vw, 64px); }
.life__list { list-style: none; margin-top: 48px; counter-reset: li; }
.life__list li { counter-increment: li; padding: 28px 0 28px 64px; border-top: 1px solid var(--line); position: relative; }
.life__list li:last-child { border-bottom: 1px solid var(--line); }
.life__list li::before { content: "0" counter(li); position: absolute; left: 0; top: 30px; font-family: var(--en); font-size: 20px; color: var(--purple); }
.life__list b { font-family: var(--serif); font-size: clamp(20px, 2vw, 28px); display: block; margin-bottom: 6px; transition: transform .5s var(--ease), color .3s; }
.life__list li:hover b { transform: translateX(10px); color: var(--purple); }
.life__list p { color: var(--muted); }
@media (max-width: 900px) {
  .life__wrap { grid-template-columns: 1fr; }
  .life__media { position: relative; top: 0; max-width: 420px; }
}

/* =========================================================
   Honors marquee（白底紫字）
   ========================================================= */
.honors { padding: clamp(40px, 6vw, 80px) 0; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marquee { display: flex; white-space: nowrap; overflow: hidden; color: var(--purple); }
.marquee__inner { display: flex; align-items: center; flex: none; will-change: transform; }
.marquee span { font-family: var(--serif); font-weight: 900; font-size: clamp(36px, 5.2vw, 84px); line-height: 1.3; padding: 0 .4em; }
.marquee__oct { width: clamp(18px, 2vw, 30px); height: clamp(18px, 2vw, 30px); flex: none; }
.marquee--outline { color: var(--text); }
.marquee--outline span { color: transparent; -webkit-text-stroke: 1px var(--text); }
.marquee--outline .marquee__oct use { fill: none; stroke: var(--text); stroke-width: 5; }

/* =========================================================
   Faculty
   ========================================================= */
.faculty__wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 120px); align-items: start; }
.frow { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); position: relative; }
.frow:first-child { border-top: 1px solid var(--line); }
.frow::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--purple); transform: scaleX(0); transform-origin: left; }
.frow.is-in::after { transform: scaleX(1); transition: transform 1.4s var(--ease); }
.frow span { color: var(--muted); }
.frow b { font-family: var(--en); font-weight: 400; font-size: clamp(40px, 4.4vw, 72px); line-height: 1; color: var(--purple); }
.faculty__note { margin-top: 32px; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .faculty__wrap { grid-template-columns: 1fr; } }

/* =========================================================
   Gallery
   ========================================================= */
.gallery { padding: clamp(60px, 8vw, 120px) var(--pad); overflow: hidden; }
.gallery__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 32px); max-width: 1440px; margin: 0 auto; }
.gcol { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 32px); will-change: transform; }
.gcol--mid { padding-top: 12vh; }
.gallery figure { overflow: hidden; border-radius: 12px; aspect-ratio: 4 / 5; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transition: transform 1.2s var(--ease-out); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery__title { padding: 20px 0 30px; }
.gallery__title .tag { color: var(--purple); opacity: 1; }
.gallery__title h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(56px, 8vw, 136px); line-height: 1.02; margin-top: 10px; }
@media (max-width: 760px) {
  .gallery__cols { grid-template-columns: 1fr 1fr; }
  .gcol--mid { grid-column: 1 / -1; order: -1; padding-top: 0; }
  .gcol--mid figure { display: none; }
}

/* =========================================================
   Contact
   ========================================================= */
.contact { padding-bottom: clamp(80px, 10vw, 150px); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact__card { border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 4vw, 56px); background: var(--paper-2); position: relative; overflow: hidden; }
.contact__card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: var(--purple); opacity: .06; clip-path: var(--oct);
  transition: transform 1.2s var(--ease-out), opacity .6s;
}
.contact__card:hover::after { transform: rotate(45deg) scale(1.15); opacity: .1; }
.contact__card .tag { color: var(--purple); opacity: 1; }
.contact__card h3 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 38px); margin: 12px 0 18px; }
.contact__card p { color: var(--muted); }
.btn {
  margin-top: 32px; display: inline-flex; align-items: center; gap: 10px; position: relative; overflow: hidden;
  padding: 15px 32px; border-radius: 999px; border: 1px solid var(--purple); color: var(--purple); isolation: isolate;
  transition: color .4s;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--purple); border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); }
.btn:hover { color: #fff; }
.btn:hover::before { transform: translateY(0); }
@media (max-width: 760px) { .contact__grid { grid-template-columns: 1fr; } }

/* =========================================================
   Footer（校徽紫，固定在底层，由内容区上移显露）
   ========================================================= */
.footer { position: relative; z-index: 0; background: var(--purple); color: #fff; padding: 72px 0 36px; overflow: hidden; }
body.footer-reveal .footer { position: fixed; left: 0; right: 0; bottom: 0; }
.footer__top { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.footer__emblem { width: 72px; height: 72px; }
.footer__info { display: flex; flex-direction: column; }
.footer__info strong { font-family: var(--serif); font-size: 20px; letter-spacing: .14em; }
.footer__info span { font-size: 13px; color: rgba(255,255,255,.72); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 14px; }
.footer__nav a { opacity: .8; transition: opacity .3s; }
.footer__nav a:hover { opacity: 1; }
.footer__big {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0 4vw;
  padding: clamp(40px, 6vw, 80px) var(--pad) clamp(24px, 3vw, 40px);
  font-family: var(--serif); font-weight: 900; font-size: clamp(52px, 10vw, 190px); line-height: 1.05;
  color: #fff;
}
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid rgba(255,255,255,.2); padding-top: 24px; font-size: 13px; color: rgba(255,255,255,.7); }
.to-top { width: 54px; height: 54px; flex: none; }
.to-top svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.2; }
.to-top__track { stroke: rgba(255,255,255,.25); }
.to-top__ring { stroke-dasharray: 138.2; stroke-dashoffset: 138.2; transform: rotate(-90deg); transform-origin: center; }
.credits { margin-top: 20px; font-size: 12px; color: rgba(255,255,255,.55); }
.credits summary { cursor: pointer; letter-spacing: .1em; }
.credits p, .credits ul { margin-top: 10px; }
.credits ul { padding-left: 18px; }
.credits a { text-decoration: underline; }
@media (max-width: 860px) {
  .footer__top { grid-template-columns: auto 1fr; }
  .footer__nav { grid-column: 1 / -1; }
}

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .loader { display: none; }
  .unveil__frame { clip-path: none; }
  .unveil__frame img { transform: none; }
  .unveil__caption { opacity: 1; }
  .motto__scroll { clip-path: none; }
  .about__statement .w { opacity: 1; }
}
