/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-dark: #0E1A2A;
  --bg-card: #152638;
  --bg-section: #0E1A2A;
  --accent: #0D9488;
  --accent-hover: #0fa89a;
  --accent-dim: rgba(13, 148, 136, 0.15);
  --text-primary: #FFFFFF;
  --text-secondary: #A0AAB8;
  --text-muted: #6B7280;
  --border: rgba(13, 148, 136, 0.25);
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  --btn-height: 52px;
  --btn-width: 200px;
  --btn-padding-x: 28px;
  --btn-padding-right: 48px;
  --btn-font-size: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--btn-height);
  min-height: var(--btn-height);
  width: var(--btn-width);
  min-width: var(--btn-width);
  padding: 0 var(--btn-padding-right) 0 var(--btn-padding-x);
  border-radius: 50px;
  font-size: var(--btn-font-size);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-dim);
}

.btn-light {
  background: #ffffff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.92);
}

.btn-light .btn-icon {
  background: var(--accent);
}

.btn-light .btn-icon svg {
  stroke: #ffffff;
}

.btn-text {
  flex: 1;
  text-align: center;
  padding-right: 36px;
}

.btn-primary .btn-icon {
  background: var(--text-primary);
}

.btn-primary .btn-icon svg {
  stroke: var(--accent);
}

.btn-outline .btn-icon {
  background: var(--text-primary);
}

.btn-outline .btn-icon svg {
  stroke: var(--accent);
}

.btn-icon {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text-primary);
  flex-shrink: 0;
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Section Headers ===== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 96px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('assets/banner.png') center/cover no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 26, 42, 0.35) 0%,
    rgba(14, 26, 42, 0.5) 50%,
    rgba(14, 26, 42, 0.72) 100%
  );
  z-index: 1;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 80px;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 56px;
  width: auto;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0;
}

.nav-links li + li::before {
  content: '|';
  margin: 0 18px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 15px;
  font-weight: 300;
}

.nav-links a {
  font-family: var(--font);
  font-size: 17px;
  color: var(--text-primary);
  transition: color 0.3s;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  font-weight: 600;
  color: var(--accent);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--btn-height);
  min-height: var(--btn-height);
  min-width: 120px;
  padding: 0 20px;
  font-family: var(--font);
  font-size: var(--btn-font-size);
  color: var(--text-primary);
  border: 1px solid var(--accent);
  border-radius: 50px;
  white-space: nowrap;
  transition: background 0.3s;
}

.lang-switch:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}


.hero-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 80px 100px;
  width: 100%;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 56px;
  max-width: 960px;
}

.hero-badge {
  width: 118px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(13, 148, 136, 0.15));
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-text h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.hero-sub {
  font-size: 24px;
  margin-bottom: 36px;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.solution-card .btn {
  align-self: center;
}

.sub-bold {
  font-weight: 600;
  color: var(--text-primary);
}

.sub-light {
  font-weight: 300;
  color: var(--text-primary);
}

.sub-accent {
  font-weight: 600;
  color: var(--accent);
}

.sub-sep {
  margin: 0 16px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}

/* ===== Stats ===== */
.stats {
  padding: 80px 60px;
  background: var(--bg-dark);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 73px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(13, 148, 136, 0.4), 0 0 60px rgba(13, 148, 136, 0.15);
}

.stat-unit {
  font-size: 42px;
}

.stat-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== Solutions ===== */
.solutions {
  padding: 80px 60px;
  background: var(--bg-section);
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.solutions-grid .solution-card:nth-child(1) { grid-column: 1 / 3; }
.solutions-grid .solution-card:nth-child(2) { grid-column: 3 / 5; }
.solutions-grid .solution-card:nth-child(3) { grid-column: 5 / 7; }
.solutions-grid .solution-card:nth-child(4) { grid-column: 2 / 4; }
.solutions-grid .solution-card:nth-child(5) { grid-column: 4 / 6; }

.solution-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px 28px;
  transition: border-color 0.3s, transform 0.3s;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.solution-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.card-header-single {
  justify-content: flex-start;
}

.card-icon-teal {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.card-icon-org {
  height: 40px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  flex-shrink: 0;
}

.solution-card h3 {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-en {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: auto;
  padding-bottom: 24px;
}

/* ===== Network / Map ===== */
.network {
  padding: 80px 60px;
  background: var(--bg-dark);
  overflow: hidden;
}

.network .section-header {
  padding: 0;
  margin-bottom: 40px;
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 950 / 620;
  background: var(--bg-dark);
  overflow: hidden;
}

.map-visual {
  position: absolute;
  inset: 0;
  -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, #000 55%, transparent 100%);
}

.world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.92;
}

.map-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to right, var(--bg-dark) 0%, transparent 12%, transparent 88%, var(--bg-dark) 100%),
    linear-gradient(to bottom, var(--bg-dark) 0%, transparent 10%, transparent 82%, var(--bg-dark) 100%);
}

.map-flare {
  position: absolute;
  left: 78.1%;
  top: 52.9%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.85) 0%, rgba(13, 148, 136, 0.45) 18%, rgba(13, 148, 136, 0.1) 42%, transparent 70%);
  filter: blur(2px);
}

.map-flare::before,
.map-flare::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgba(13, 148, 136, 0.45), transparent);
}

.map-flare::before {
  width: 260px;
  height: 2px;
}

.map-flare::after {
  width: 2px;
  height: 260px;
  background: linear-gradient(180deg, transparent, rgba(13, 148, 136, 0.45), transparent);
}

.map-dot {
  position: absolute;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(13, 148, 136, 0.85);
  box-shadow: 0 0 12px rgba(13, 148, 136, 0.8), 0 0 24px rgba(13, 148, 136, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-dot--active {
  width: 12px;
  height: 12px;
  background: #0D9488;
  box-shadow: 0 0 16px rgba(13, 148, 136, 1), 0 0 32px rgba(13, 148, 136, 0.5);
}

.map-marker {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0;
  transform: translate(0, -100%);
  z-index: 3;
}

.map-label {
  background: #ffffff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.map-info-bar {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  z-index: 4;
  width: max-content;
  max-width: calc(100% - 48px);
  background: #ffffff;
  padding: 14px 28px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  white-space: nowrap;
}

.map-info-bar p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 60px;
  animation: marquee 25s linear infinite;
  width: max-content;
}

.partner-logo {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 20px;
  border-radius: 4px;
}

.pl-who { color: #0093D5; }
.pl-fao { color: #009A44; }
.pl-unep { color: #007DBC; }
.pl-oie { color: #582C83; }
.pl-un { color: #009EDB; }
.pl-mspp { color: #333; }
.pl-juc { color: #0D9488; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Technology ===== */
.technology {
  padding: 80px 60px;
  background: var(--bg-section);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 56px;
}

.tech-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s;
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.tech-card-img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.tech-card-link {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}

.tech-card-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-footer {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.tech-footer-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.tech-footer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
  margin: 0;
}

/* ===== Join / Footer CTA ===== */
.join {
  position: relative;
  padding: 80px 60px 60px;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.join-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 440px) 1fr;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 480px;
  z-index: 1;
}

.join-globe-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 420px;
  max-height: 520px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.join-globe-bg-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(72px, 10vw, 128px);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(13, 148, 136, 0.04);
  white-space: nowrap;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.join-globe-orbits {
  position: absolute;
  width: 100%;
  height: 100%;
  max-width: 420px;
  max-height: 420px;
  z-index: 1;
  pointer-events: none;
  animation: join-orbit-spin 48s linear infinite;
}

.join-globe {
  position: relative;
  width: min(72%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 2;
}

.join-globe-glow {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.12) 0%, rgba(13, 148, 136, 0.04) 50%, transparent 72%);
  filter: blur(16px);
}

.join-globe-surface {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background-color: #142636;
  background-image: url('assets/world-map.svg');
  background-size: 200% 100%;
  background-position: 0 center;
  background-repeat: no-repeat;
  box-shadow:
    inset -16px -12px 32px rgba(0, 0, 0, 0.35),
    inset 6px 6px 18px rgba(255, 255, 255, 0.04),
    0 0 32px rgba(13, 148, 136, 0.1);
  animation: join-globe-spin 120s linear infinite;
}

.join-globe-tint {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(13, 148, 136, 0.12) 0%, rgba(14, 26, 42, 0.45) 72%),
    linear-gradient(160deg, rgba(13, 148, 136, 0.08) 0%, rgba(14, 26, 42, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
}

.join-globe-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 2;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.1) 0%, transparent 36%),
    radial-gradient(circle at 74% 80%, rgba(0, 0, 0, 0.28) 0%, transparent 46%);
  pointer-events: none;
}

@keyframes join-globe-spin {
  from { background-position: 0 center; }
  to { background-position: 200% center; }
}

@keyframes join-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .join-globe-surface,
  .join-globe-orbits {
    animation: none;
  }
}

.join-content {
  position: relative;
  z-index: 2;
  text-align: left;
}

.join h2 {
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.join-desc-cn {
  font-size: 20px;
  color: var(--accent);
  line-height: 1.8;
  margin-bottom: 20px;
  font-weight: 500;
}

.join-desc {
  font-size: 16px;
  color: #94a3b8;
  line-height: 1.8;
  margin: 0;
}

.join-buttons {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 960px;
  width: 100%;
  margin: 48px auto 0;
  padding-top: 24px;
}

.join-buttons .btn {
  flex: 0 0 auto;
  width: var(--btn-width);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.site-footer {
  padding: 24px 60px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .solutions-grid {
    grid-template-columns: 1fr;
  }

  .solutions-grid .solution-card:nth-child(n) {
    grid-column: auto;
  }

  .tech-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 24px;
  }

  .logo img {
    height: 44px;
  }

  .nav-right {
    gap: 16px;
  }

  .lang-switch {
    display: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 88px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(14, 26, 42, 0.98);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
  }

  .nav-links li + li::before {
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content {
    padding: 0 24px 60px;
  }

  .hero-inner {
    flex-direction: column;
    gap: 28px;
    text-align: center;
  }

  .hero-badge {
    width: 100px;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-text h1 {
    font-size: 32px;
    letter-spacing: 1px;
  }

  .hero-sub {
    font-size: 20px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .map-container {
    padding: 0;
  }

  .map-marker {
    transform: translate(-8px, -90%);
  }

  .map-label {
    font-size: 10px;
    padding: 6px 10px;
    white-space: normal;
    max-width: 110px;
  }

  .map-info-bar {
    bottom: 4%;
    padding: 12px 16px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .map-info-bar p {
    font-size: 11px;
  }

  .stats,
  .solutions,
  .technology,
  .network,
  .join {
    padding-left: 24px;
    padding-right: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .stat-number {
    font-size: 52px;
  }

  .solutions-grid {
    grid-template-columns: 1fr;
  }

  .section-header h2 {
    font-size: 22px;
  }

  .join {
    padding-top: 48px;
    padding-bottom: 40px;
  }

  .join-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 28px;
  }

  .join-globe-stage {
    min-height: 260px;
    max-height: 300px;
    order: 2;
  }

  .join-globe {
    width: min(72%, 240px);
  }

  .join-globe-bg-text {
    font-size: 48px;
    letter-spacing: 0.08em;
  }

  .join-content {
    order: 1;
    max-width: 100%;
  }

  .join h2 {
    font-size: 28px;
    margin-bottom: 16px;
  }

  .join-desc-cn {
    font-size: 17px;
    margin-bottom: 14px;
  }

  .join-desc {
    font-size: 14px;
  }

  .join-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 32px;
    padding-top: 0;
  }

  .join-buttons .btn {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .site-footer {
    padding: 20px 24px;
    font-size: 11px;
  }
}
