/* CSS Variables & Reset */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Colors */
  --color-bg: #FFFFFF;
  --color-fg: #111111;
  --color-text-secondary: #666666;
  --color-accent: #000000;
  --color-accent-fg: #FFFFFF;
  --color-brand: #201B71;
  /* New Brand Aux Color */
  --color-border: #E5E5E5;
  --color-placeholder: #F2F2F2;
  /* Light grey for image placeholders */

  /* Spacing */
  --container-width: 1200px;
  --header-height: 80px;
  --radius-button: 12px;
  --radius-card: 16px;
}

/* ... (keep everything else same until btn-primary) ... */

.btn-primary {
  background-color: var(--color-brand);
  /* Use brand color */
  color: #FFFFFF;
  border: 1px solid var(--color-brand);
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(32, 27, 113, 0.2);
  /* Colored shadow on hover */
}

/* ... (keep btn-outline) ... */

/* ... (finding feature-icon) ... */

.feature-icon {
  width: 48px;
  height: 48px;
  background-color: var(--color-brand);
  /* Brand color embellishment */
  border-radius: 12px;
  margin-bottom: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

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

.grid {
  display: grid;
}

.text-center {
  text-align: center;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 64px;
  line-height: 1.1;
  margin-bottom: 24px;
}

h2 {
  font-size: 40px;
  margin-bottom: 16px;
}

p {
  color: var(--color-text-secondary);
}

.text-lg {
  font-size: 20px;
}

.text-sm {
  font-size: 14px;
}

/* Bilingual Label Utility */
.cn-label {
  display: block;
  font-size: 13px;
  /* Smaller font for Chinese */
  color: #999;
  /* Gray color */
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  margin-bottom: 2px;
}

/* Specific component tweaks for bilingual */
h1 .cn-label {
  font-size: 24px;
  margin-bottom: 8px;
  font-weight: 500;
}

h2 .cn-label {
  font-size: 20px;
  margin-bottom: 6px;
  font-weight: 500;
}

h3 .cn-label {
  font-size: 14px;
  margin-bottom: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  flex-direction: column;
  /* Stack text */
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  /* Slightly adjusted padding */
  font-weight: 500;
  border-radius: var(--radius-button);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.2;
}

.btn .cn-label {
  font-size: 12px;
  color: inherit;
  opacity: 0.7;
  margin-bottom: 0;
}

.btn-primary {
  background-color: var(--color-brand);
  color: #FFFFFF;
  border: 1px solid var(--color-brand);
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(32, 27, 113, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-fg);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-fg);
}

.btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
}

/* Header */
header {
  height: auto;
  /* Allow height to grow */
  min-height: var(--header-height);
  padding: 12px 0;
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

header.scrolled {
  border-color: var(--color-border);
}

.nav-logo {
  font-weight: 800;
  font-size: 24px;
  margin-right: 48px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  /* Center items vertically */
}

.nav-links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-links a:hover {
  color: var(--color-fg);
}

/* Hero Section */
.hero {
  padding: 80px 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-visual {
  width: 100%;
  height: 600px;
  /* Fixed height for chart */
  background-color: transparent;
  /* Clean background */
  border-radius: var(--radius-card);
  margin-top: 64px;
  position: relative;
  overflow: hidden;
  /* Ensure chart stays inside border radius */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  /* Subtle shadow instead of border */
}

/* Feature Section */
.features {
  padding: 100px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.feature-card {
  padding: 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background-color: var(--color-brand);
  border-radius: 12px;
  margin-bottom: 24px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

/* Content Split Section */
.split-section {
  padding: 100px 0;
}

.split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.placeholder-img {
  width: 100%;
  height: 400px;
  background-color: var(--color-placeholder);
  border-radius: var(--radius-card);
}

/* Footer */
footer {
  background-color: #000000;
  color: #FFFFFF;
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 80px;
}

.footer-logo {
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 24px;
  display: block;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  opacity: 0.9;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col a {
  color: #999999;
  font-size: 14px;
}

.footer-col a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #888888;
  flex-wrap: wrap;
  gap: 16px;
}

.icp-info {
  display: flex;
  gap: 24px;
}

@media (max-width: 768px) {
  h1 {
    font-size: 40px;
  }

  .grid,
  .split-container,
  .feature-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero-visual {
    height: 300px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Logo Wall Section */
.logo-section {
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.logo-wall-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 40px;
}

.logo-grid {
  display: flex;
  justify-content: center;
  gap: 60px;
  align-items: center;
  flex-wrap: wrap;
}

.logo-item {
  position: relative;
  cursor: pointer;
  padding: 16px;
  border-radius: var(--radius-card);
  transition: all 0.3s ease;
}

.logo-item img {
  height: 68px;
  /* Increased by ~40% from 48px */
  /* Initial fixed height for consistency */
  width: auto;
  filter: grayscale(100%) opacity(0.7);
  transition: all 0.3s ease;
}

.logo-item:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}

.logo-item .hover-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: white;
  padding: 8px 16px;
  border-radius: 100px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  /* Let clicks pass through to container */
  white-space: nowrap;
  border: 1px solid var(--color-border);
}

.logo-item:hover .hover-btn {
  transform: translate(-50%, -100%) scale(1);
  /* Move up slightly */
  opacity: 1;
}

/* Fullscreen Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: none;
  /* Changed from center/center to allow scrolling tall images */
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  /* Enable vertical scrolling */
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 60px 0;
  /* Space for top/bottom */
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  width: 80%;
  /* Requested 80% width */
  max-width: 1000px;
  /* Sane max width */
  max-height: none;
  /* Remove height limit */
  position: relative;
  margin: auto;
  /* Center in flex container if needed, but flex settings handle mostly */
}

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  background: white;
  /* In case transparent png */
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.modal-close:hover {
  opacity: 1;
}

/* Feature Intro Layout (Extracted) */
.feature-intro {
  display: flex;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

.feature-intro-text {
  flex: 1;
  min-width: 300px;
}

.feature-intro-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 300px;
}

/* About Stats Layout (Extracted) */
.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  border-top: 1px solid #E5E5E5;
  padding-top: 32px;
}

@media (max-width: 768px) {
  h1 {
    font-size: 32px;
    /* Smaller for mobile */
  }

  /* Header Mobile */
  header .container {
    flex-direction: column;
    gap: 16px;
    height: auto !important;
  }

  .nav-logo {
    margin-right: 0;
    margin-bottom: 8px;
  }

  .nav-links {
    display: flex;
    /* Show links */
    flex-wrap: wrap;
    /* Allow wrapping */
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    /* Space before buttons */
    width: 100%;
  }

  .nav-links a {
    text-align: center;
    padding: 4px 8px;
  }

  /* Header Buttons Mobile - Force Row */
  #header-actions {
    width: 100%;
    justify-content: center;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    /* Force side-by-side */
    gap: 8px !important;
    padding: 0 4px;
    margin-top: 0;
  }

  #header-actions .btn {
    flex: 1;
    /* Distribute space equally */
    padding: 8px 0 !important;
    /* Minimal horizontal padding */
    font-size: 11px !important;
    /* Smaller text to fit */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 44px;
    /* Fixed height touch target */
    white-space: nowrap;
  }

  #header-actions .btn .cn-label {
    font-size: 12px !important;
    margin-bottom: 2px;
  }

  .grid,
  .split-container,
  .feature-grid,
  .feature-intro,
  /* Stack feature intro */
  .footer-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .feature-intro {
    gap: 32px;
  }

  .feature-intro-text,
  .feature-intro-image {
    min-width: 100%;
    /* Full width on mobile */
    justify-content: center;
    text-align: center;
  }

  .feature-intro-image img {
    margin: 0 auto;
    /* Center image */
  }

  .hero {
    padding: 40px 0;
  }

  .hero-visual {
    height: 300px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .icp-info {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .modal-content {
    width: 95%;
    /* Wider on mobile */
  }

  .logo-grid {
    gap: 30px;
  }

  .logo-item img {
    height: 48px;
    /* Smaller logos */
  }

  /* About Stats Mobile */
  .about-stats {
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-around;
  }

  /* Mobile Overrides */
  .hero-visual {
    display: none;
  }

  .feature-intro-image img,
  .split-section img {
    width: 80% !important;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }
}