@import url('https://fonts.googleapis.com/css2?family=Libre+Bodoni:wght@400;500;600;700&family=Public+Sans:wght@300;400;500;600;700&display=swap');

/* ===== CSS 变量 ===== */
:root {
  --c-red: #ff0000;
  --c-pink: #ff006e;
  --c-dark: #1a1a2e;
  --c-darker: #0d0d1a;
  --c-cyan: #00ffff;
  --c-blue: #0080ff;
  --c-white: #f0e6ff;
  --c-muted: #8888aa;
  --c-card: #16213e;
  --c-border: rgba(255, 0, 110, 0.3);

  --font-serif: 'Libre Bodoni', Georgia, 'Times New Roman', serif;
  --font-sans: 'Public Sans', system-ui, -apple-system, sans-serif;

  --radius-card: 28px;
  --radius-pill: 999px;

  --nav-height: 64px;
  --anchor-height: 44px;

  --transition: 0.25s ease;
  --glow-red: 0 0 8px #ff0000, 0 0 20px rgba(255,0,0,0.5);
  --glow-pink: 0 0 8px #ff006e, 0 0 20px rgba(255,0,110,0.5);
  --glow-cyan: 0 0 8px #00ffff, 0 0 16px rgba(0,255,255,0.4);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--anchor-height) + 8px);
  font-size: 16px;
  background: var(--c-darker);
  color: var(--c-white);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--c-darker);
  color: var(--c-white);
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-pink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-cyan); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.2; }

/* ===== 扫描线覆盖层 ===== */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  animation: scanline-drift 8s linear infinite;
}

@keyframes scanline-drift {
  0% { background-position: 0 0; }
  100% { background-position: 0 200px; }
}

/* ===== 几何底纹背景 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ===== 主导航 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 13, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.nav-right {
  justify-content: flex-end;
}

.nav-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-white);
  text-shadow: var(--glow-pink);
  letter-spacing: 0.05em;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-muted);
  white-space: nowrap;
  transition: all var(--transition);
}

.nav-pill:hover {
  color: var(--c-pink);
  border-color: var(--c-pink);
  box-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
  background: rgba(255, 0, 110, 0.08);
}

/* ===== 粘性锚点条 ===== */
.anchor-bar {
  position: sticky;
  top: var(--nav-height);
  z-index: 90;
  background: rgba(26, 26, 46, 0.96);
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
  height: var(--anchor-height);
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-bar::-webkit-scrollbar { display: none; }

.anchor-bar-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  min-height: 32px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c-muted);
  white-space: nowrap;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.anchor-link:hover {
  color: var(--c-cyan);
  border-color: var(--c-cyan);
  text-shadow: var(--glow-cyan);
}

/* ===== HERO ===== */
.hero-section {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + var(--anchor-height));
  gap: 0;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 0, 110, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(0, 128, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-figure {
  position: relative;
  flex: 1 1 50%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.hero-img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  display: block;
  filter: saturate(1.2) contrast(1.1);
}

.hero-placeholder {
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hero-badge {
  position: absolute;
  top: 32px;
  left: 32px;
  background: var(--c-red);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--glow-red);
  letter-spacing: 0.1em;
  z-index: 2;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: var(--glow-red); }
  50% { box-shadow: 0 0 20px #ff0000, 0 0 40px rgba(255,0,0,0.6); }
}

.hero-aside {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  text-align: center;
  z-index: 1;
  position: relative;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--c-cyan);
  text-transform: uppercase;
  text-shadow: var(--glow-cyan);
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: var(--radius-pill);
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--c-white);
  text-shadow: var(--glow-pink);
  margin-bottom: 24px;
  line-height: 1.15;
}

/* 故障动效 */
.glitch-text {
  position: relative;
  animation: glitch-main 4s ease-in-out infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.glitch-text::before {
  color: var(--c-cyan);
  animation: glitch-before 4s ease-in-out infinite;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
}

.glitch-text::after {
  color: var(--c-red);
  animation: glitch-after 4s ease-in-out infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
}

@keyframes glitch-main {
  0%, 90%, 100% { transform: none; }
  92% { transform: skewX(-2deg); }
  94% { transform: skewX(2deg); }
  96% { transform: none; }
}

@keyframes glitch-before {
  0%, 90%, 100% { transform: none; opacity: 0; }
  92% { transform: translate(-3px, 0); opacity: 0.8; }
  96% { transform: none; opacity: 0; }
}

@keyframes glitch-after {
  0%, 92%, 100% { transform: none; opacity: 0; }
  94% { transform: translate(3px, 0); opacity: 0.8; }
  98% { transform: none; opacity: 0; }
}

.hero-desc {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 400px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 14px 40px;
  min-height: 52px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  box-shadow: var(--glow-pink);
  transition: all var(--transition);
}

.hero-cta:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px #ff006e, 0 0 40px rgba(255, 0, 110, 0.5);
}

/* ===== 内容区 ===== */
.content-section {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.content-aside {
  flex: 0 0 260px;
  position: sticky;
  top: calc(var(--nav-height) + var(--anchor-height) + 16px);
  order: 2;
}

.aside-inner {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.1);
}

.aside-heading {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--c-pink);
  text-shadow: var(--glow-pink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}

.aside-heading span {
  display: inline-block;
}

.aside-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aside-list li {
  font-size: 0.88rem;
  color: var(--c-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.aside-list li::before {
  content: '◈';
  position: absolute;
  left: 0;
  color: var(--c-red);
  font-size: 0.7rem;
  top: 2px;
}

.content-main {
  flex: 1 1 0;
  min-width: 0;
  order: 1;
}

/* ===== 正文内容 HTML 样式 ===== */
.content-main h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--c-white);
  text-shadow: var(--glow-pink);
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.content-main h2 span {
  display: inline-block;
}

.content-main h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--c-pink);
  margin: 2rem 0 0.8rem;
}

.content-main h3 span {
  display: inline-block;
}

.content-main p {
  margin-bottom: 1.2rem;
  color: #c8c0d8;
  font-size: 1rem;
  line-height: 1.8;
}

.content-main ul,
.content-main ol {
  margin: 1rem 0 1.4rem 0;
  padding-left: 0;
}

.content-main ul li,
.content-main ol li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: 0.6rem;
  color: #c8c0d8;
  font-size: 1rem;
  line-height: 1.7;
}

.content-main ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--c-red);
}

.content-main ol {
  counter-reset: ol-counter;
}

.content-main ol li {
  counter-increment: ol-counter;
}

.content-main ol li::before {
  content: counter(ol-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--c-pink);
  font-size: 0.8rem;
  font-weight: 600;
}

.content-main strong {
  color: var(--c-white);
  font-weight: 600;
}

.content-main em {
  color: var(--c-cyan);
  font-style: normal;
}

.content-main a {
  color: var(--c-pink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-main a:hover {
  color: var(--c-cyan);
}

.content-main blockquote {
  margin: 1.5rem 0;
  padding: 16px 24px;
  border-left: 3px solid var(--c-red);
  background: rgba(255, 0, 0, 0.05);
  border-radius: 0 12px 12px 0;
  color: var(--c-muted);
  font-style: italic;
}

/* section 内部的 figure 和 aside 样式 */
.content-main section {
  margin-bottom: 3rem;
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 0, 110, 0.1);
  scroll-margin-top: calc(var(--nav-height) + var(--anchor-height) + 8px);
}

.content-main section:last-child {
  border-bottom: none;
}

.content-main section figure {
  margin: 1.5rem 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--c-border);
}

.content-main section aside {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  color: var(--c-muted);
}

/* 区块入场动画 */
.content-main section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.content-main section.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--c-dark);
  border-top: 1px solid var(--c-border);
  padding: 0;
  overflow: hidden;
}

.footer-brand-block {
  padding: 40px 48px 0;
  overflow: hidden;
}

.footer-mega-brand {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 110, 0.25);
  line-height: 1;
  letter-spacing: -0.02em;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

.footer-columns {
  padding: 40px 48px;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}

.footer-dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-dl dt {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-pink);
  text-shadow: var(--glow-pink);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

.footer-dl dd {
  margin: 0;
}

.footer-dl dd a {
  font-size: 0.88rem;
  color: var(--c-muted);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-dl dd a:hover {
  color: var(--c-white);
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--c-muted);
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-top: 1px solid rgba(255, 0, 110, 0.15);
  font-size: 0.78rem;
  color: var(--c-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tagline {
  color: rgba(255, 0, 110, 0.6);
}

/* ===== 滚动揭示 JS 类 ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .hero-section {
    flex-direction: column;
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--anchor-height));
  }

  .hero-figure {
    width: 100%;
    min-height: 50vh;
    flex: none;
  }

  .hero-img {
    height: 50vh;
  }

  .hero-placeholder {
    height: 50vh;
  }

  .hero-aside {
    flex: none;
    width: 100%;
    padding: 48px 32px;
  }

  .content-section {
    flex-direction: column;
  }

  .content-aside {
    flex: none;
    width: 100%;
    position: static;
    order: 1;
  }

  .content-main {
    order: 2;
  }

  .footer-nav {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-dl--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .main-nav {
    gap: 8px;
  }

  .nav-pill {
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  .hero-aside {
    padding: 36px 20px;
  }

  .content-section {
    padding: 40px 16px;
  }

  .footer-columns {
    padding: 32px 24px;
  }

  .footer-brand-block {
    padding: 32px 24px 0;
  }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-dl--brand {
    grid-column: auto;
  }

  .footer-bottom {
    padding: 16px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .nav-left,
  .nav-right {
    display: none;
  }

  .main-nav {
    justify-content: center;
  }

  .anchor-bar-inner {
    gap: 2px;
    padding: 0 12px;
  }

  .anchor-link {
    padding: 6px 8px;
    font-size: 0.72rem;
  }

  .hero-badge {
    top: 16px;
    left: 16px;
    font-size: 0.78rem;
    padding: 6px 14px;
  }

  .footer-mega-brand {
    font-size: clamp(2.5rem, 15vw, 5rem);
  }
}

/* ===== 无障碍 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .scanlines {
    display: none;
  }
}

/* 焦点样式 */
:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

button[aria-expanded]{min-width:44px;min-height:44px}
