/* ============================================================
 * 濮工英工作室 · Pugongying Computer Studio
 * Style Sheet (pure CSS3, no dependencies)
 * ============================================================ */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Palette */
  --bg-deep: #050816;
  --bg-soft: #0a0e27;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);

  --neon-cyan: #00f5ff;
  --neon-cyan-soft: rgba(0, 245, 255, 0.18);
  --neon-purple: #7d4dff;
  --neon-purple-soft: rgba(125, 77, 255, 0.22);
  --gradient: linear-gradient(135deg, #00f5ff 0%, #7d4dff 100%);
  --gradient-soft: linear-gradient(135deg, rgba(0,245,255,0.18) 0%, rgba(125,77,255,0.18) 100%);

  --text: #ffffff;
  --text-soft: #b8c5d6;
  --text-mute: #7a89a0;

  --shadow-glow: 0 12px 40px -10px rgba(0, 245, 255, 0.35);
  --shadow-card: 0 8px 30px -8px rgba(0, 0, 0, 0.6);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Layout */
  --maxw: 1180px;
  --nav-h: 68px;

  /* Type */
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
          -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.25s var(--ease); }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea {
  font: inherit; color: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px var(--neon-cyan-soft);
  background: rgba(255, 255, 255, 0.06);
}
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--neon-cyan) 50%), linear-gradient(135deg, var(--neon-cyan) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select option { background: var(--bg-soft); color: var(--text); }
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--neon-cyan), var(--neon-purple)); border-radius: 6px; }

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

/* Reveal-on-scroll baseline (will be toggled by JS) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* Section header (shared) */
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--neon-cyan);
  margin: 0 0 10px;
  padding: 6px 14px;
  border: 1px solid var(--neon-cyan-soft);
  border-radius: 999px;
  background: var(--neon-cyan-soft);
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub {
  color: var(--text-mute);
  font-size: 15px;
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #02101a;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -10px rgba(125, 77, 255, 0.55); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--neon-cyan); color: var(--neon-cyan); }
.btn-block { width: 100%; }

/* ---------- 4. Nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background: rgba(5, 8, 22, 0.72);
  border-bottom-color: var(--border);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 40px; height: 40px; flex-shrink: 0; }
.brand-logo svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-zh { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: 0.02em; }
.brand-en { font-size: 10.5px; letter-spacing: 0.18em; color: var(--neon-cyan); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links a.join-cta {
  background: var(--gradient);
  color: #02101a;
  font-weight: 700;
  margin-left: 6px;
}
.nav-links a.join-cta:hover { transform: translateY(-1px); }

.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; padding: 9px; }
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text); margin: 5px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--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); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
  animation: float 14s var(--ease) infinite alternate;
}
.hero-glow-a { width: 480px; height: 480px; background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%); top: -100px; left: -100px; }
.hero-glow-b { width: 520px; height: 520px; background: radial-gradient(circle, var(--neon-purple) 0%, transparent 70%); bottom: -120px; right: -120px; animation-delay: -7s; }
@keyframes float {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.1); }
}

.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 880px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--neon-cyan);
  margin: 0 0 18px;
  padding: 6px 16px;
  border: 1px solid var(--neon-cyan-soft);
  border-radius: 999px;
  background: var(--neon-cyan-soft);
  font-weight: 600;
}
.hero-title { margin: 0 0 18px; line-height: 1.05; }
.hero-title-zh {
  display: block;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.04em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title-en {
  display: block;
  margin-top: 12px;
  font-size: clamp(13px, 1.6vw, 18px);
  letter-spacing: 0.28em;
  color: var(--neon-cyan);
  font-weight: 600;
}
.hero-school {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-soft);
  margin: 0 0 28px;
  letter-spacing: 0.04em;
}
.hero-desc {
  font-size: clamp(15px, 1.7vw, 17px);
  color: var(--text-soft);
  line-height: 1.9;
  margin: 0 0 36px;
}
.hero-desc strong { color: var(--neon-cyan); font-weight: 700; }

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 2px solid var(--border-strong);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.hero-scroll-hint span {
  display: block;
  width: 3px; height: 8px;
  background: var(--neon-cyan);
  border-radius: 2px;
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- 6. About ---------- */
.about { padding: 110px 0 80px; position: relative; }
.about::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan-soft), transparent);
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}
.about-card { padding: 32px 26px; transition: transform 0.35s var(--ease), border-color 0.35s var(--ease); }
.about-card:hover { transform: translateY(-6px); border-color: var(--neon-cyan-soft); }
.about-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-soft);
  color: var(--neon-cyan);
  margin-bottom: 18px;
}
.about-card-icon svg { width: 26px; height: 26px; }
.about-card h3 { color: var(--text); margin: 0 0 10px; font-size: 20px; font-weight: 700; }
.about-card p { color: var(--text-soft); font-size: 14.5px; line-height: 1.8; margin: 0; }
.about-card p strong { color: var(--neon-cyan); font-weight: 700; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--gradient-soft);
  border: 1px solid var(--neon-cyan-soft);
}
.stat { text-align: center; padding: 28px 16px; background: rgba(5, 8, 22, 0.55); }
.stat-num {
  display: block;
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.stat-label { color: var(--text-soft); font-size: 14px; letter-spacing: 0.05em; }

/* ---------- 7. Division (Algorithm / Project) ---------- */
.division { padding: 80px 0; position: relative; }
.division::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-purple-soft), transparent);
}
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 36px;
}
.adv-card {
  position: relative;
  padding: 28px 22px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  overflow: hidden;
}
.adv-card::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gradient-soft);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.adv-card:hover { transform: translateY(-6px); border-color: var(--neon-cyan-soft); box-shadow: var(--shadow-card); }
.adv-card:hover::before { opacity: 0.6; }
.adv-card > * { position: relative; }
.adv-index {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--neon-cyan);
  margin-bottom: 14px;
}
.adv-card h3 { font-size: 17px; color: var(--text); margin: 0 0 10px; font-weight: 700; }
.adv-card p { font-size: 13.5px; color: var(--text-soft); line-height: 1.7; margin: 0; }
.division-slogan {
  text-align: center;
  margin: 8px 0 0;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- 8. Certificates ---------- */
.certs { padding: 100px 0 80px; position: relative; }
.certs::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan-soft), transparent);
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.cert-card {
  margin: 0;
  padding: 14px;
  cursor: zoom-in;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.cert-card:hover { transform: translateY(-6px); border-color: var(--neon-cyan-soft); box-shadow: var(--shadow-card); }
.cert-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e27, #1a1f3a);
  border: 1px solid var(--border);
}
.cert-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.cert-card:hover .cert-img-wrap img { transform: scale(1.04); }
.cert-card figcaption { padding: 12px 4px 2px; }
.cert-card h3 { font-size: 14.5px; color: var(--text); margin: 0 0 5px; font-weight: 700; line-height: 1.45; }
.cert-card p { font-size: 12.5px; color: var(--text-mute); margin: 0; letter-spacing: 0.02em; line-height: 1.5; }

/* ---------- 9. Gallery (Masonry) ---------- */
.gallery { padding: 100px 0 80px; position: relative; }
.gallery::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-purple-soft), transparent);
}
.masonry {
  column-count: 4;
  column-gap: 18px;
}
.masonry-item {
  margin: 0 0 18px;
  break-inside: avoid;
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.masonry-item:hover { transform: translateY(-4px); border-color: var(--neon-cyan-soft); box-shadow: var(--shadow-card); }
.masonry-item img {
  width: 100%; height: auto; display: block;
  transition: transform 0.55s var(--ease), filter 0.55s var(--ease);
}
.masonry-item figcaption {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 22, 0.45);
  font-weight: 500;
}
.masonry-item:hover img { transform: scale(1.05); filter: brightness(1.08) saturate(1.15); }

/* ---------- 10. Join / Contact ---------- */
.join { padding: 100px 0 80px; position: relative; }
.join::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan-soft), transparent);
}
.join-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}
.join-form { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row label, .form-full { display: flex; flex-direction: column; gap: 6px; }
.form-row label span, .form-full span {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.form-row label span i, .form-full span i { color: var(--neon-cyan); font-style: normal; margin-left: 2px; }
.form-tip {
  margin: 4px 0 0;
  font-size: 13px;
  min-height: 1em;
  color: var(--text-mute);
}
.form-tip.is-ok { color: var(--neon-cyan); }
.form-tip.is-err { color: #ff6b8a; }

.contact-card { padding: 32px; }
.contact-card h3 { font-size: 20px; color: var(--text); margin: 0 0 18px; font-weight: 700; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .ci {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-soft);
  border: 1px solid var(--neon-cyan-soft);
  color: var(--neon-cyan);
  font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.contact-list strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.contact-list a, .contact-list span { color: var(--text-soft); font-size: 13.5px; word-break: break-all; }
.contact-list a:hover { color: var(--neon-cyan); }

.qr-block {
  margin-top: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border-strong);
  text-align: center;
}
.qr-code {
  width: 168px; height: 168px;
  margin: 0 auto 12px;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 2px;
}
.qr-code span {
  background: #fff;
  border-radius: 2px;
}
.qr-code span:nth-child(1)  { background: #111; }
.qr-code span:nth-child(2)  { background: #fff; }
.qr-code span:nth-child(3)  { background: #111; }
.qr-code span:nth-child(4)  { background: #111; grid-column: span 2; grid-row: span 2; border-radius: 4px; }
.qr-code span:nth-child(5)  { background: #fff; }
.qr-code span:nth-child(6)  { background: #111; grid-column: span 2; grid-row: span 2; border-radius: 4px; }
.qr-code span:nth-child(7)  { background: #fff; }
.qr-code span:nth-child(8)  { background: #111; grid-column: span 2; grid-row: span 2; border-radius: 4px; }
.qr-code span:nth-child(9)  { background: #111; }
.qr-code span:nth-child(10) { background: #fff; }
.qr-code span:nth-child(11) { background: #111; }
.qr-code span:nth-child(12) { background: #fff; }
.qr-code span:nth-child(13) { background: #111; }
.qr-code span:nth-child(14) { background: #fff; }
.qr-code span:nth-child(15) { background: #111; }
.qr-code span:nth-child(16) { background: #fff; }
.qr-code span:nth-child(17) { background: #111; }
.qr-code span:nth-child(18) { background: #fff; }
.qr-code span:nth-child(19) { background: #111; }
.qr-code span:nth-child(20) { background: #fff; }
.qr-code span:nth-child(21) { background: #111; }
.qr-code span:nth-child(22) { background: #fff; }
.qr-code span:nth-child(23) { background: #111; }
.qr-code span:nth-child(24) { background: #fff; }
.qr-code span:nth-child(25) { background: #111; }
.qr-code span:nth-child(26) { background: #fff; }
.qr-code span:nth-child(27) { background: #111; }
.qr-code span:nth-child(28) { background: #fff; }
.qr-code span:nth-child(29) { background: #111; }
.qr-code span:nth-child(30) { background: #fff; }
.qr-code span:nth-child(31) { background: #111; }
.qr-code span:nth-child(32) { background: #fff; }
.qr-code span:nth-child(33) { background: #111; }
.qr-code span:nth-child(34) { background: #fff; }
.qr-code span:nth-child(35) { background: #111; }
.qr-code span:nth-child(36) { background: #fff; }
.qr-code span:nth-child(37) { background: #111; }
.qr-code span:nth-child(38) { background: #fff; }
.qr-code span:nth-child(39) { background: #111; }
.qr-code span:nth-child(40) { background: #fff; }
.qr-code span:nth-child(41) { background: #111; }
.qr-code span:nth-child(42) { background: #fff; }
.qr-code span:nth-child(43) { background: #111; }
.qr-code span:nth-child(44) { background: #fff; }
.qr-code span:nth-child(45) { background: #111; }
.qr-code span:nth-child(46) { background: #fff; }
.qr-code span:nth-child(47) { background: #111; }
.qr-code span:nth-child(48) { background: #fff; }
.qr-code span:nth-child(49) { background: #111; }
.qr-code span:nth-child(50) { background: #fff; }
.qr-code span:nth-child(51) { background: #111; }
.qr-code span:nth-child(52) { background: #fff; }
.qr-code span:nth-child(53) { background: #111; }
.qr-code span:nth-child(54) { background: #fff; }
.qr-code span:nth-child(55) { background: #111; }
.qr-code span:nth-child(56) { background: #fff; }
.qr-code span:nth-child(57) { background: #111; }
.qr-code span:nth-child(58) { background: #fff; }
.qr-code span:nth-child(59) { background: #111; }
.qr-code span:nth-child(60) { background: #fff; }
.qr-code span:nth-child(61) { background: #111; }
.qr-code span:nth-child(62) { background: #fff; }
.qr-code span:nth-child(63) { background: #111; }
.qr-code span:nth-child(64) { background: #fff; }
.qr-tip { font-size: 13px; color: var(--text-soft); margin: 0; letter-spacing: 0.04em; }

/* ---------- 11. Footer ---------- */
.site-footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 39, 0.6) 100%);
}
.footer-inner { display: flex; flex-direction: column; gap: 28px; align-items: center; text-align: center; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand h3 { margin: 0; font-size: 18px; color: var(--text); }
.footer-brand p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-mute); letter-spacing: 0.06em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.footer-nav a {
  padding: 4px 12px; font-size: 13.5px; color: var(--text-soft);
  border-radius: 999px; transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--neon-cyan); background: rgba(255,255,255,0.04); }
.footer-copy { margin: 0; font-size: 12.5px; color: var(--text-mute); line-height: 1.8; }
.footer-meta { font-size: 11.5px; opacity: 0.7; }

/* ---------- 12. Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 22, 0.92);
  backdrop-filter: blur(6px);
  padding: 40px 20px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px -10px rgba(0,0,0,0.8);
  border: 1px solid var(--border-strong);
  background: #fff;
}
.lightbox-caption {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  font-size: 14px;
  background: rgba(0,0,0,0.4);
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  max-width: 80vw;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 26px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox-close:hover { background: var(--neon-cyan); color: #02101a; transform: rotate(90deg); }

/* ---------- 13. Responsive ---------- */
@media (max-width: 1023px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .advantage-grid { grid-template-columns: repeat(3, 1fr); }
  .masonry { column-count: 3; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .join-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  :root { --nav-h: 60px; }
  .container { padding: 0 18px; }

  /* mobile nav: hamburger drawer */
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 18px 22px;
    background: rgba(5, 8, 22, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 15px; border-radius: 12px; }
  .nav-links a.join-cta { text-align: center; margin: 6px 0 0; }

  .brand-en { display: none; }
  .brand-zh { font-size: 15px; }

  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px; }
  .hero-title-zh { letter-spacing: 0.02em; }
  .hero-desc { font-size: 14.5px; }
  .hero-actions .btn { padding: 11px 20px; font-size: 14px; }
  .hero-scroll-hint { display: none; }

  .about, .division, .certs, .gallery, .join { padding: 70px 0; }
  .about-grid, .advantage-grid { grid-template-columns: 1fr; }
  .masonry { column-count: 2; column-gap: 12px; }
  .masonry-item { margin-bottom: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); padding: 22px 16px; gap: 14px; }
  .stat { padding: 22px 10px; }
  .form-row { grid-template-columns: 1fr; }
  .join-form, .contact-card { padding: 24px; }
  .qr-code { width: 140px; height: 140px; padding: 8px; }
}

@media (max-width: 420px) {
  .masonry { column-count: 1; }
  .hero-title-en { letter-spacing: 0.18em; }
  .section-title { letter-spacing: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
/* join section: form removed, single contact card */
.join-grid-single { display: block; max-width: 840px; margin: 0 auto; }
.join-grid-single .contact-card { padding: 2.4rem 2.6rem; }
.join-grid-single .contact-list li { padding: 1.1rem 0; border-bottom: 1px dashed rgba(127,149,176,.18); }
.join-grid-single .contact-list li:last-child { border-bottom: none; }
.contact-value { display: inline-block; margin-top: .35rem; font-size: 1.06rem; font-weight: 600; letter-spacing: .03em; color: #00f5ff; text-decoration: none; }
.contact-note { display: block; margin-top: .2rem; font-size: .8rem; color: #7a89a0; }

/* ===== Mobile robustness: never hide content behind entrance animations =====
   Some mobile webviews / slow networks fail to fire IntersectionObserver in time,
   which left .reveal blocks transparent (blank strips with only background).
   On small screens we show everything immediately; scroll effects stay on desktop. */
@media (max-width: 767px) {
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Reserve layout space for lazy images to avoid column jumps / blank strips */
.masonry-item img { background: rgba(0,245,255,0.04); }
.cert-card img   { background: rgba(127,77,255,0.05); }

.contact-qr { margin-top: 1.4rem; padding: 1.1rem; border: 1px dashed rgba(0,245,255,.45); border-radius: 14px; text-align: center; }
.contact-qr-title { font-weight: 700; color: #00f5ff; margin-bottom: .3rem; }
.contact-qr-sub { font-size: .8rem; color: #7a89a0; }

/* anchor jump offset below sticky nav (mobile "立即报名" misposition fix) */
section[id], footer[id] { scroll-margin-top: calc(var(--nav-h, 64px) + 14px); }

/* mobile gallery → horizontal swipe deck */
.gallery-swipe-hint { display: none; }
@media (max-width: 767px) {
  #gallery .masonry {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 12px;
    scrollbar-width: none;
  }
  #gallery .masonry::-webkit-scrollbar { display: none; }
  #gallery .masonry-item {
    flex: 0 0 78%;
    scroll-snap-align: center;
    margin-bottom: 0;
  }
  #gallery .masonry-item img {
    width: 100%;
    max-height: 52vh;
    object-fit: cover;
  }
  .gallery-swipe-hint {
    display: block;
    text-align: center;
    font-size: .78rem;
    color: #7a89a0;
    letter-spacing: .04em;
    margin: 0 0 14px;
  }
}

/* mobile certificates → horizontal swipe deck */
.certs-swipe-hint { display: none; }
@media (max-width: 767px) {
  #certs .cert-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 14px;
    scrollbar-width: none;
  }
  #certs .cert-grid::-webkit-scrollbar { display: none; }
  #certs .cert-card {
    flex: 0 0 78%;
    scroll-snap-align: center;
    margin: 0;
  }
  #certs .cert-card .cert-img-wrap img {
    width: 100%;
    max-height: 46vh;
    object-fit: contain;
  }
  .certs-swipe-hint {
    display: block;
    text-align: center;
    font-size: .78rem;
    color: #7a89a0;
    letter-spacing: .04em;
    margin: 0 0 14px;
  }
}

.contact-qr { text-align: center; }
.qr-img { display: block; margin: .6rem auto 0; width: 200px; max-width: 70%; height: auto; border-radius: 12px; background: #fff; padding: 8px; box-shadow: 0 4px 18px rgba(0,245,255,.18); }
