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

/* ===== CSS 变量 ===== */
:root {
  --color-primary: #c8e0f4;
  --color-secondary: #f5e0e8;
  --color-bg: #171f26;
  --color-bg-raised: #1e2830;
  --color-bg-deep: #111820;
  --color-text: #d8eaf8;
  --color-text-muted: #8ca5bb;
  --color-text-dark: #171f26;
  --color-border: rgba(200, 224, 244, 0.12);
  --color-accent: #f5e0e8;

  --neu-shadow-out:
    -6px -6px 16px rgba(255, 255, 255, 0.04),
    6px 6px 16px rgba(0, 0, 0, 0.5);
  --neu-shadow-in:
    inset -4px -4px 10px rgba(255, 255, 255, 0.03),
    inset 4px 4px 10px rgba(0, 0, 0, 0.45);
  --neu-shadow-card:
    -4px -4px 12px rgba(200, 224, 244, 0.06),
    4px 4px 14px rgba(0, 0, 0, 0.55);
  --neu-shadow-hover:
    -6px -6px 18px rgba(200, 224, 244, 0.09),
    6px 6px 18px rgba(0, 0, 0, 0.6);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --header-h: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --transition-fast: 150ms ease;
  --transition-std: 280ms ease;
}

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

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

body {
  font-family: var(--font);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-secondary); }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, button, textarea { font-family: var(--font); }

/* ===== scroll-margin for anchors ===== */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ===== 导航 header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(23, 31, 38, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 2rem;
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

.brand-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  min-width: 40px;
  min-height: 40px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
}

.brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
}

.main-nav {
  flex: 1;
  overflow: hidden;
}

.nav-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-row::-webkit-scrollbar { display: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
}

.nav-link:hover {
  color: var(--color-primary);
  background: rgba(200, 224, 244, 0.08);
  box-shadow: var(--neu-shadow-out);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ===== main ===== */
.site-main {
  padding-top: var(--header-h);
}

/* ===== Hero Section ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 6rem 4rem 4rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(200, 224, 244, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(245, 224, 232, 0.05) 0%, transparent 50%),
    var(--color-bg);
  text-align: right;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(200, 224, 244, 0.03) 59px,
      rgba(200, 224, 244, 0.03) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(200, 224, 244, 0.03) 59px,
      rgba(200, 224, 244, 0.03) 60px
    );
  pointer-events: none;
}

.hero-badges {
  position: absolute;
  top: calc(var(--header-h) + 2rem);
  right: 4rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background: rgba(200, 224, 244, 0.08);
  border: 1px solid rgba(200, 224, 244, 0.2);
  border-radius: 999px;
  box-shadow: var(--neu-shadow-out);
}

.badge-alt {
  color: var(--color-secondary);
  background: rgba(245, 224, 232, 0.08);
  border-color: rgba(245, 224, 232, 0.2);
}

.hero-figure {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-shadow:
    0 0 60px rgba(200, 224, 244, 0.2),
    0 4px 24px rgba(0, 0, 0, 0.5);
}

.hero-sub {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-left: auto;
}

/* ===== Content Section ===== */
.content-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 4rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}

.content-figure {
  min-width: 0;
}

.content-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

/* 正文内容样式 */
.content-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 2.5rem 0 0.5rem;
  letter-spacing: -0.02em;
}

.content-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin: 2rem 0 0.5rem;
}

.content-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1rem 0 1.5rem;
}

.content-body p {
  margin-bottom: 1.2rem;
  color: var(--color-text);
}

.content-body ul, .content-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style: disc;
}

.content-body li {
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.content-body a {
  color: var(--color-primary);
  border-bottom: 1px solid rgba(200, 224, 244, 0.3);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.content-body a:hover {
  color: var(--color-secondary);
  border-color: rgba(245, 224, 232, 0.5);
}

.content-body section {
  padding: 2rem;
  margin-bottom: 2.5rem;
  background: linear-gradient(145deg, var(--color-bg-raised), var(--color-bg-deep));
  border-radius: var(--radius-md);
  box-shadow: var(--neu-shadow-card);
  border-bottom: 3px solid var(--color-primary);
  position: relative;
  overflow: hidden;
}

.content-body section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 224, 244, 0.15), transparent);
}

/* ===== Aside ===== */
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: linear-gradient(145deg, var(--color-bg-raised), var(--color-bg-deep));
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--neu-shadow-card);
  border-bottom: 3px solid var(--color-secondary);
}

.aside-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.content-aside hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.aside-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  min-height: 44px;
}

.aside-link:hover {
  color: var(--color-primary);
  background: rgba(200, 224, 244, 0.08);
  box-shadow: var(--neu-shadow-out);
  transform: translateX(4px);
}

.aside-note {
  padding: 0.75rem;
  background: rgba(200, 224, 244, 0.05);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--color-primary);
}

.aside-note p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-bg-deep);
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 3rem;
  padding: 4rem 3rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer-contact {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-contact a {
  color: var(--color-primary);
}

.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.footer-nav-col hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.35rem 0;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  min-height: 44px;
}

.footer-link:hover {
  color: var(--color-primary);
}

.footer-contact-col hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.form-input {
  padding: 0.65rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.875rem;
  outline: none;
  box-shadow: var(--neu-shadow-in);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
}

.form-input:focus {
  border-color: rgba(200, 224, 244, 0.4);
  box-shadow: var(--neu-shadow-in), 0 0 0 2px rgba(200, 224, 244, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.form-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(145deg, rgba(200, 224, 244, 0.15), rgba(200, 224, 244, 0.08));
  border: 1px solid rgba(200, 224, 244, 0.25);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--neu-shadow-out);
  transition: all var(--transition-fast);
  min-height: 44px;
}

.form-btn:hover {
  background: linear-gradient(145deg, rgba(200, 224, 244, 0.22), rgba(200, 224, 244, 0.12));
  box-shadow: var(--neu-shadow-hover);
  transform: translateY(-1px);
}

.form-btn:active {
  transform: scale(0.97);
  box-shadow: var(--neu-shadow-in);
}

/* ===== Footer Bottom ===== */
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 1.25rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom-logo {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-bottom-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom-link {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: 0.4rem 0.25rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-bottom-link:hover {
  color: var(--color-primary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

/* ===== Parallax container ===== */
.hero-section {
  will-change: transform;
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .content-section {
    grid-template-columns: 1fr 260px;
    padding: 3rem 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 2rem 2rem;
  }

  .hero-section {
    padding: 5rem 2.5rem 3rem;
  }

  .hero-badges {
    right: 2.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 58px;
  }

  .site-header {
    padding: 0 1.25rem;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(17, 24, 32, 0.98);
    backdrop-filter: blur(20px);
    padding: 1rem 1.25rem 2rem;
    border-bottom: 1px solid var(--color-border);
    z-index: 99;
  }

  .main-nav.open {
    display: block;
  }

  .nav-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .nav-link {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    min-height: 48px;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-section {
    padding: 5rem 1.5rem 3rem;
    align-items: flex-start;
    text-align: left;
  }

  .hero-badges {
    top: calc(var(--header-h) + 1rem);
    right: 1.5rem;
    left: 1.5rem;
  }

  .hero-sub {
    margin-left: 0;
    text-align: left;
  }

  .content-section {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem;
  }

  .content-aside {
    position: static;
    order: -1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem 1.5rem;
    gap: 2rem;
  }

  .footer-bottom {
    padding: 1rem 1.25rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .footer-copy {
    margin-left: 0;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 4.5rem 1rem 2rem;
  }

  .hero-badges {
    right: 1rem;
    left: 1rem;
  }

  .content-section {
    padding: 1.5rem 1rem;
  }

  .content-body section {
    padding: 1.25rem;
  }

  .footer-inner {
    padding: 2rem 1rem 1.5rem;
  }

  .footer-bottom {
    padding: 1rem;
  }
}
