:root {
  --bg0: #fffbf0;
  --bg1: #f5f0ff;
  --card: rgba(255, 255, 255, 0.85);
  --text: #2d2d3d;
  --muted: #6b7280;
  --line: rgba(45, 45, 61, 0.1);
  --shadow: 0 14px 45px rgba(45, 45, 61, 0.1);
  --shadow-lg: 0 25px 60px rgba(45, 45, 61, 0.12);
  --accent: #6366f1;
  --accent2: #a78bfa;
  --accent3: #34d399;
  --radius: 18px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.7 -apple-system, "Helvetica Neue", "Segoe UI", Roboto, "PingFang SC", 
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 800px at 15% -5%, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0) 50%),
    radial-gradient(900px 700px at 95% 15%, rgba(167, 139, 241, 0.08) 0%, rgba(167, 139, 241, 0) 50%),
    radial-gradient(800px 600px at 40% 110%, rgba(52, 211, 153, 0.06) 0%, rgba(52, 211, 153, 0) 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
  min-height: 100vh;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

main.open-layout {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}


a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  transition: var(--transition);
}

a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}

.wrap {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 999;
}

.skip-link:focus {
  left: 12px;
}

/* Site Header - Enhanced */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 251, 240, 0.8);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(45, 45, 61, 0.06);
  animation: slideDown 0.5s ease;
  padding: 20px 0;
  text-align: center;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.brand-center {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: var(--transition);
}

.brand-center:hover {
  transform: scale(1.06);
  text-decoration: none;
}

.brand-center .brand-mark {
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.28);
  font-size: 16px;
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Hero Section */
.hero {
  padding: 80px 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 560px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 20s ease-in-out infinite;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 25s ease-in-out infinite reverse;
  z-index: 0;
}

.hero .wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  33% { transform: translateY(-30px) translateX(20px); }
  66% { transform: translateY(30px) translateX(-20px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  max-width: 720px;
  animation: fadeInUp 0.8s ease 0.4s both;
  letter-spacing: -0.02em;
}

.hero-note {
  display: inline-block;
  padding: 14px 28px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 500;
  animation: fadeInUp 0.8s ease 0.6s both, shimmer 4s ease-in-out 2s infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(100deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 80%);
}

@keyframes shimmer {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 20px rgba(45, 45, 61, 0.08);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: var(--transition);
  font-family: -apple-system, "Helvetica Neue", "Segoe UI", sans-serif;
}

.btn.primary {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.35);
}

.btn.primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(99, 102, 241, 0.45);
  color: #fff;
  text-decoration: none;
}

.btn-large {
  padding: 16px 48px;
  font-size: 16px;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

/* Content Sections */
.text-section {
  padding: 0; /* Adjusted for new layout */
  scroll-margin-top: 80px;
}

/* Contact Section */
.contact-section {
  padding: 40px 0; /* Adjusted for new layout */
  text-align: center;
}

.contact-intro {
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact-email {
  margin-top: 24px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

/* Utilities */
.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.list {
  margin: 12px 0 0;
  padding-left: 18px;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
}

.footer-inner {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left p {
  margin: 4px 0;
  font-size: 14px;
  font-weight: 500;
  color: #52525B;
}

.footer-right {
  display: flex;
  gap: 18px;
}

.footer-right a {
  font-size: 14px;
  font-weight: 500;
  color: #52525B;
  text-decoration: none;
  transition: var(--transition);
}

.footer-right a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Document Layouts */
.document-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 0 40px;
}

.document-header {
  text-align: center;
  margin-bottom: 48px;
}

.document-header h1 {
  font-size: 48px;
  margin: 0 0 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.document-header .muted {
  font-size: 15px;
  color: var(--muted);
}

.document-content {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px;
  box-shadow: 0 8px 24px rgba(45, 45, 61, 0.08);
}

.doc-section {
  line-height: 1.8;
  color: var(--text);
}

.doc-section p {
  margin: 0 0 20px;
  font-size: 16px;
}

.doc-section h2 {
  font-size: 24px;
  margin: 40px 0 18px;
  padding-top: 28px;
  color: var(--text);
  border-top: 1px solid var(--line);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc-section h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 24px;
}

.doc-section ul.list {
  margin: 18px 0 26px;
  padding-left: 24px;
}

.doc-section li {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.doc-section li strong {
  color: var(--text);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 860px) {
  .hero {
    min-height: 420px;
    padding: 50px 0 30px;
  }

  .hero .wrap {
    gap: 20px;
  }

  .text-section {
    padding: 50px 0;
  }

  .contact-section {
    padding: 70px 0 60px;
  }

  .contact-intro {
    font-size: 16px;
    margin: 0 0 24px;
  }

  .document-content {
    padding: 36px 24px;
  }

  .document-header h1 {
    font-size: 36px;
  }

  .doc-section h2 {
    font-size: 20px;
    margin-top: 28px;
  }

  .btn-large {
    padding: 14px 36px;
    font-size: 15px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }

  .footer-left {
    width: 100%;
    order: 2;
  }

  .footer-right {
    width: 100%;
    justify-content: center;
    order: 1;
  }
}
