/* ==========================================================
   home.css — 首页（Apple 产品页式滚动叙事）
   ========================================================== */

/* ---------- 1. Hero：深色、粒子星尘、标题随滚动缩放 ---------- */
.hero {
  position: relative; height: 230vh; background: var(--night); color: #f5f3ee;
}
.hero__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: grid; place-items: center; text-align: center;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__aurora {
  position: absolute; width: 120vmax; height: 120vmax; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(closest-side at 35% 40%, rgba(110, 75, 216, 0.55), transparent 70%),
    radial-gradient(closest-side at 65% 60%, rgba(218, 119, 86, 0.28), transparent 70%),
    radial-gradient(closest-side at 50% 50%, rgba(74, 47, 163, 0.45), transparent 75%);
  filter: blur(30px);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  100% { transform: translate(-48%, -52%) rotate(40deg) scale(1.15); }
}
.hero__content { position: relative; z-index: 2; padding: 0 var(--gutter); will-change: transform, opacity; }
.hero__title {
  margin: 0; font-weight: 600; line-height: 1.04; letter-spacing: -0.02em;
  font-size: clamp(48px, 10.5vw, 168px);
}
.hero__title .grad-text { padding: 0 0.04em; }
.hero__quote {
  margin: clamp(26px, 4vw, 48px) auto 0; max-width: 22em;
  font-size: clamp(20px, 2.6vw, 34px); line-height: 1.7; font-weight: 400; letter-spacing: 0.08em;
}
.hero__hint {
  position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 2;
  font-size: 13px; letter-spacing: 0.3em; color: rgba(245, 243, 238, 0.6);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.hero__mouse {
  width: 24px; height: 38px; border-radius: 14px; border: 1.5px solid rgba(245,243,238,0.45); position: relative;
}
.hero__mouse::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px;
  background: #c9b4ff; animation: wheel 1.8s var(--ease-out) infinite;
}
@keyframes wheel { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- 2. Profile ---------- */
.profile { position: relative; padding: clamp(110px, 16vw, 200px) 0 clamp(80px, 10vw, 140px); background: var(--surface); }
.profile__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.profile__hello {
  font-size: clamp(44px, 7.6vw, 112px); line-height: 1.12; font-weight: 600; margin: 22px 0 0; letter-spacing: -0.01em;
}
.profile__hello .name { display: inline-block; }
.profile__text {
  margin-top: clamp(36px, 5vw, 64px); max-width: 34em;
  font-size: clamp(19px, 2.05vw, 27px); line-height: 2.1; color: var(--ink-2); letter-spacing: 0.04em;
}
.profile__text p { margin: 0 0 0.6em; }
.profile__text p:first-child { color: var(--ink); }

/* 标签：Apple 式横向滑动胶囊 + 无限跑马灯 */
.tags { margin-top: clamp(56px, 7vw, 96px); overflow: hidden; position: relative;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tags__track { display: flex; gap: 14px; width: max-content; animation: marquee 38s linear infinite; padding: 10px 0; }
.tags:hover .tags__track { animation-play-state: paused; }
.tags--rev .tags__track { animation-direction: reverse; animation-duration: 44s; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tag {
  flex: none; padding: 14px 24px; border-radius: 999px; font-size: 17px; white-space: nowrap;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 10px 26px -18px rgba(36, 20, 81, 0.5);
  transition: transform 0.5s var(--ease-spring), background 0.4s, color 0.4s, border-color 0.4s;
}
.tag:hover { transform: translateY(-4px) scale(1.05); background: var(--purple-4); color: #fff; border-color: transparent; }

/* ---------- 3. 卡片区（Organization / Contact） ---------- */
.tiles { padding: clamp(80px, 10vw, 140px) 0; background: var(--paper); }
.tiles__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tiles__grid {
  margin-top: clamp(36px, 5vw, 60px);
  display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.tiles__grid--org { grid-template-columns: minmax(0, 1fr); }
.tile {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 230px; padding: 30px 30px 28px; border-radius: var(--radius-l);
  background: #fff; border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out), border-color 0.4s;
  box-shadow: 0 20px 40px -32px rgba(36, 20, 81, 0.4);
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(155, 123, 240, 0.18), transparent 45%);
}
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: 1; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(110, 75, 216, 0.9), rgba(218, 119, 86, 0.5) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.5s;
}
.tile:hover { box-shadow: 0 40px 70px -40px rgba(36, 20, 81, 0.55); border-color: transparent; }
.tile:hover::before, .tile:hover::after { opacity: 1; }
.tile__icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--purple-1); color: var(--purple-4);
  transition: transform 0.7s var(--ease-spring), background 0.4s, color 0.4s;
}
.tile__icon svg { width: 26px; height: 26px; fill: currentColor; }
.tile:hover .tile__icon { transform: translateZ(30px) rotate(-8deg) scale(1.08); background: var(--purple-4); color: #fff; }
.tile__name { font-size: 30px; font-weight: 600; margin: 26px 0 4px; line-height: 1.25; }
.tile__desc { font-size: 15px; color: var(--ink-3); letter-spacing: 0.04em; }
.tile__arrow {
  position: absolute; right: 26px; bottom: 26px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line);
  transition: transform 0.5s var(--ease-spring), background 0.4s, color 0.4s;
}
.tile__arrow svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.tile:hover .tile__arrow { transform: rotate(-45deg); background: var(--ink); color: #fff; }

.tile--org {
  min-height: 300px; background: var(--night); color: #f5f3ee; border-color: transparent;
  padding: clamp(32px, 5vw, 56px);
}
.tile--org .tile__name { font-size: clamp(40px, 6vw, 76px); margin-top: 40px; }
.tile--org .tile__desc { color: rgba(245,243,238,0.6); }
.tile--org .tile__icon { background: rgba(255,255,255,0.08); color: #c9b4ff; }
.tile--org .tile__arrow { border-color: rgba(255,255,255,0.2); }
.tile--org:hover .tile__arrow { background: #f5f3ee; color: var(--ink); }
.tile--org .org-orb {
  position: absolute; right: -10%; top: -40%; width: 70%; aspect-ratio: 1; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 90deg, #6e4bd8, #da7756, #9b7bf0, #4a2fa3, #6e4bd8);
  filter: blur(60px); opacity: 0.55; animation: auraSpin 20s linear infinite;
}

/* ---------- 4. 成就：滚动驱动的横向时间轴 ---------- */
.achv { position: relative; background: var(--night); color: #f5f3ee; }
.achv__pin { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.achv__head { padding-top: 40px; }
.achv__head .eyebrow { color: #c9b4ff; }
.achv__track { display: flex; gap: clamp(20px, 3vw, 36px); margin-top: clamp(30px, 5vh, 60px); padding-left: var(--gutter); padding-right: 30vw; will-change: transform; }
.year-card {
  flex: none; width: min(78vw, 460px); border-radius: var(--radius-l); padding: 34px 34px 30px;
  background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
.year-card__year {
  font-size: clamp(76px, 10vw, 132px); line-height: 1; font-weight: 600; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 20%, rgba(201, 180, 255, 0.35)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.year-card ul { list-style: none; margin: 26px 0 0; padding: 0; }
.year-card li {
  display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 19px; letter-spacing: 0.03em;
}
.year-card li::before {
  content: ""; width: 10px; height: 10px; flex: none; transform: rotate(45deg);
  background: var(--grad-purple); box-shadow: 0 0 14px rgba(155,123,240,0.9);
}
.year-card .medal { margin-left: auto; font-family: var(--font-hand); font-size: 22px; color: #ffb59b; }
.year-card::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -80px; bottom: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 75, 216, 0.55), transparent 70%);
}
.achv__bar { margin: clamp(30px, 5vh, 54px) var(--gutter) 0; height: 2px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.achv__bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--grad-purple); }

/* ---------- 5. 杂项：大幅入口卡 ---------- */
.misc { padding: clamp(100px, 13vw, 170px) 0; background: var(--surface); }
.misc__grid { margin-top: clamp(40px, 6vw, 70px); display: grid; gap: 24px; grid-template-columns: repeat(12, 1fr); }
.entry {
  position: relative; grid-column: span 6; min-height: 540px; border-radius: 34px; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(28px, 4vw, 48px);
  color: #f5f3ee; background: var(--night);
  transition: transform 0.8s var(--ease-out), box-shadow 0.8s var(--ease-out);
}
.entry:hover { transform: translateY(-8px); box-shadow: 0 50px 90px -50px rgba(36, 20, 81, 0.9); }
.entry--mahjong { grid-column: span 12; min-height: 420px; background: linear-gradient(135deg, #f1eaff, #fbfaf7 55%, #f6dfd5); color: var(--ink); }
.entry__name { font-size: clamp(42px, 5.6vw, 80px); font-weight: 600; line-height: 1.1; margin: 0; position: relative; z-index: 2; }
.entry__sub { font-size: 18px; margin-top: 4px; opacity: 0.85; position: relative; z-index: 2; }
.entry__desc { font-size: 17px; margin-top: 4px; opacity: 0.65; letter-spacing: 0.06em; position: relative; z-index: 2; }
.entry__cta { margin-top: 22px; align-self: flex-start; position: relative; z-index: 2; }
.entry__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(11,8,18,0) 30%, rgba(11,8,18,0.92) 100%); }

/* 电影：胶片海报墙，悬停加速 */
.filmwall { position: absolute; inset: -10% -20%; display: flex; gap: 14px; transform: rotate(-12deg); z-index: 0; }
.filmwall__col { display: flex; flex-direction: column; gap: 14px; animation: filmUp 30s linear infinite; }
.filmwall__col:nth-child(2n) { animation-direction: reverse; }
.filmwall__col img { width: 150px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; filter: saturate(0.8) brightness(0.8); }
.entry:hover .filmwall__col { animation-duration: 12s; }
@keyframes filmUp { to { transform: translateY(-50%); } }

/* 音乐：旋转的唱片与封面 */
.vinyl-stage { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; transform: translateY(-14%); }
.vinyl {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0 14%, #111 15% 16%, transparent 17%), repeating-radial-gradient(circle, #1c1922 0 2px, #0c0a10 2px 5px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  transform: translateX(70px); animation: discSpin 6s linear infinite;
  transition: transform 1s var(--ease-out);
}
.entry:hover .vinyl { transform: translateX(130px); }
.cover-stack { position: relative; width: 300px; height: 300px; transform: translateX(-60px); }
.cover-stack img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5); transition: transform 1s var(--ease-out), opacity 1s;
}
.cover-stack img:nth-child(1) { transform: rotate(-10deg) translate(-40px, 10px); opacity: 0.6; }
.cover-stack img:nth-child(2) { transform: rotate(-4deg) translate(-18px, 4px); opacity: 0.85; }
.entry:hover .cover-stack img:nth-child(1) { transform: rotate(-18deg) translate(-90px, 20px); }
.entry:hover .cover-stack img:nth-child(2) { transform: rotate(-8deg) translate(-44px, 8px); }
.entry--music .entry__shade { background: linear-gradient(180deg, rgba(36,20,81,0) 35%, rgba(36,20,81,0.95) 100%); }

/* 麻将：浮动牌 */
.tiles-float { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mj {
  position: absolute; width: 74px; height: 98px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(180deg, #fff, #f3efe6); font-size: 40px; line-height: 1; font-weight: 700; color: #1d1b16; font-family: var(--font-hand); writing-mode: vertical-rl;
  box-shadow: 0 6px 0 #c9b4ff, 0 22px 30px -10px rgba(36,20,81,0.35);
  animation: mjFloat 6s ease-in-out infinite; animation-delay: var(--dl, 0s);
}
@keyframes mjFloat { 50% { transform: translateY(-18px) rotate(var(--rot, 6deg)); } }
.entry--mahjong .pill { background: var(--ink); }

@media (max-width: 860px) {
  .entry, .entry--mahjong { grid-column: span 12; min-height: 460px; }
  .vinyl { width: 260px; height: 260px; }
  .cover-stack { width: 220px; height: 220px; }
  .mj { width: 54px; height: 72px; font-size: 34px; }
}

.mj[data-red] { color: #c8372d; }
.mj[data-green] { color: #1f7a4d; }
