/* landing.css — Dark landing page: nav hero + AWS-style world map + side panel */
/* Loaded after pages.css; scoped to the landing view via .on-landing + .landing-* */

:root {
  --landing-logo: url('/assets/log.svg');
  --landing-ocean: #070d18;
  --landing-ocean-deep: #050a13;
  --landing-land: #1a2d52;
  --landing-land-edge: #2a4077;
  --landing-glow: #41d1ff;
  --landing-glow-soft: rgba(65, 209, 255, 0.35);
  --landing-grid: rgba(65, 209, 255, 0.07);
}

/* Hide the standard top-bar on the landing so the dark nav integrates cleanly */
body.on-landing .top-bar { display: none; }
body.on-landing .page-content {
  padding: 0;
  background: var(--landing-ocean);
  /* allow normal vertical scrolling so news strip below the landing view is reachable */
}
body.on-landing .sidebar { display: none; }

/* ── LANDING SHELL ─────────────────────────────────── */
.landing-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 60% at 50% 20%, rgba(36, 59, 106, 0.45), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(59, 130, 246, 0.18), transparent 70%),
    var(--landing-ocean);
  color: var(--white);
  font-family: var(--font-cn);
  display: flex;
  flex-direction: column;
}

/* ── TOP NAV ───────────────────────────────────────── */
.landing-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(7, 13, 24, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(65, 209, 255, 0.08);
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}
.landing-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.landing-nav-logo {
  height: 36px;
  width: auto;
  display: block;
  background-image: var(--landing-logo);
  background-repeat: no-repeat;
  background-size: contain;
  /* Fallback: if logo image fails, show colored badge */
  min-width: 120px;
}
.landing-nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.landing-nav-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}
.landing-nav-btn {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(241, 245, 249, 0.85);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.landing-nav-btn:hover:not([data-disabled="true"]) {
  background: rgba(65, 209, 255, 0.08);
  border-color: rgba(65, 209, 255, 0.35);
  color: var(--white);
  transform: translateY(-1px);
}
.landing-nav-btn:focus-visible:not([data-disabled="true"]) {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}
.landing-nav-btn.active,
.landing-nav-btn.active:hover {
  background: var(--accent-blue-dim);
  border-color: rgba(59, 130, 246, 0.55);
  color: var(--white);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25), 0 6px 20px rgba(59, 130, 246, 0.18);
  /* underline that signals "this is where you are" */
  border-bottom: 2px solid var(--accent-blue);
  border-radius: 8px 8px 6px 6px;
}
.landing-nav-btn .nav-btn-icon { font-size: 15px; line-height: 1; }
.landing-nav-btn .nav-btn-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  letter-spacing: 0.02em;
}
.landing-nav-btn[data-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}
.landing-nav-btn[data-disabled="true"]:hover {
  transform: none;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
}

/* Hamburger (mobile) ───────────────────────── */
.landing-nav-hamburger {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ── HERO ─────────────────────────────────────────── */
.landing-hero {
  position: relative;
  padding: 36px 32px 28px;
  flex-shrink: 0;
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 13, 24, 0) 0%, rgba(7, 13, 24, 0.55) 100%);
  pointer-events: none;
}
.landing-hero-inner {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  animation: heroFadeIn 0.6s var(--ease);
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.landing-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--landing-glow);
  padding: 4px 10px;
  border: 1px solid rgba(65, 209, 255, 0.3);
  border-radius: 999px;
  margin-bottom: 14px;
}
.landing-hero-title {
  font-family: var(--font-en);
  font-size: 38px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.landing-hero-subtitle-cn {
  font-size: 16px;
  color: rgba(241, 245, 249, 0.88);
  font-weight: 400;
  margin-bottom: 4px;
}
.landing-hero-subtitle-en {
  font-family: var(--font-en);
  font-size: 13.5px;
  color: rgba(148, 163, 184, 0.95);
  letter-spacing: 0.04em;
}

/* ── MAP STAGE ────────────────────────────────────── */
.landing-map-stage {
  position: relative;
  flex: 1;
  min-height: 360px;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0px, transparent 39px, var(--landing-grid) 39px, var(--landing-grid) 40px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 39px, var(--landing-grid) 39px, var(--landing-grid) 40px);
}
.landing-map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
.landing-map-canvas:active { cursor: grabbing; }

/* Backup (no-JS) world map SVG layers behind canvas */
.landing-map-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}

/* ── MAP CHIPS (region filters) ───────────────────── */
.landing-map-chips {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(7, 13, 24, 0.7);
  border: 1px solid rgba(65, 209, 255, 0.15);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  max-width: calc(100% - 32px);
  overflow-x: auto;
}
.landing-map-chip {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(203, 213, 225, 0.85);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--ease);
}
.landing-map-chip:hover { color: var(--white); background: rgba(65, 209, 255, 0.08); }
.landing-map-chip.active {
  background: rgba(65, 209, 255, 0.18);
  color: var(--white);
  box-shadow: 0 0 0 1px rgba(65, 209, 255, 0.35);
}

/* ── MARKERS (HTML overlay) ───────────────────────── */
.landing-map-marker-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.landing-map-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--landing-glow);
  box-shadow:
    0 0 0 4px var(--landing-glow-soft),
    0 0 14px 4px rgba(65, 209, 255, 0.55);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  animation: markerPulse 2.6s ease-in-out infinite;
  transition: transform 0.15s var(--ease);
  z-index: 5;
}
.landing-map-marker:hover {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow:
    0 0 0 6px var(--landing-glow-soft),
    0 0 22px 6px rgba(65, 209, 255, 0.85);
}
.landing-map-marker[data-status="operating"] { background: var(--landing-glow); }
.landing-map-marker[data-status="building"] { background: var(--accent-amber); box-shadow: 0 0 0 4px rgba(245,158,11,0.35), 0 0 14px 4px rgba(245,158,11,0.55); }
.landing-map-marker[data-status="planned"] { background: var(--accent-green); box-shadow: 0 0 0 4px rgba(16,185,129,0.35), 0 0 14px 4px rgba(16,185,129,0.55); }
.landing-map-marker::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65, 209, 255, 0.32) 0%, rgba(65, 209, 255, 0) 70%);
  z-index: -1;
  pointer-events: none;
}
.landing-map-marker.hidden { display: none; }
@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--landing-glow-soft), 0 0 14px 4px rgba(65, 209, 255, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(65, 209, 255, 0.18), 0 0 18px 8px rgba(65, 209, 255, 0.7); }
}

.landing-map-region-label {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(226, 240, 255, 0.55);
  text-shadow: 0 0 10px rgba(65, 209, 255, 0.35);
  white-space: nowrap;
  z-index: 4;
  user-select: none;
}

.landing-map-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 24, 41, 0.95);
  border: 1px solid rgba(65, 209, 255, 0.4);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
  z-index: 6;
}
.landing-map-tooltip strong { color: var(--landing-glow); font-weight: 600; }
.landing-map-tooltip .tt-proj { color: rgba(148, 163, 184, 0.85); font-size: 11px; margin-top: 2px; display: block; }
.landing-map-marker:hover .landing-map-tooltip { opacity: 1; }

/* Map hint at bottom-left */
.landing-map-hint {
  position: absolute;
  bottom: 14px;
  left: 16px;
  font-size: 11px;
  color: rgba(148, 163, 184, 0.7);
  letter-spacing: 0.04em;
  font-family: var(--font-en);
  z-index: 5;
}

/* Map legend */
.landing-map-legend {
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: flex;
  gap: 14px;
  background: rgba(7, 13, 24, 0.7);
  border: 1px solid rgba(65, 209, 255, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: rgba(203, 213, 225, 0.9);
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.landing-map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.landing-map-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.landing-map-legend-dot.dot-op { background: var(--landing-glow); box-shadow: 0 0 6px rgba(65,209,255,0.6); }
.landing-map-legend-dot.dot-build { background: var(--accent-amber); box-shadow: 0 0 6px rgba(245,158,11,0.6); }
.landing-map-legend-dot.dot-plan { background: var(--accent-green); box-shadow: 0 0 6px rgba(16,185,129,0.6); }

/* ── SIDE PANEL ───────────────────────────────────── */
.landing-side-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease);
  z-index: 49;
}
.landing-side-panel-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.landing-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 460px;
  max-width: 92vw;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: var(--white);
  border-left: 1px solid rgba(65, 209, 255, 0.15);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.28s var(--ease);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.landing-side-panel.open { transform: translateX(0); }
.landing-side-panel-header {
  padding: 18px 20px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: rgba(7, 13, 24, 0.7);
}
.landing-side-panel-titles { flex: 1; min-width: 0; }
.landing-side-panel-title-zh {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
  color: var(--white);
}
.landing-side-panel-title-en {
  font-family: var(--font-en);
  font-size: 12.5px;
  color: rgba(148, 163, 184, 0.9);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.landing-side-panel-region {
  font-size: 11.5px;
  color: var(--landing-glow);
  letter-spacing: 0.06em;
}
.landing-side-panel-close {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}
.landing-side-panel-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.landing-side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 28px;
}
.landing-side-panel-desc {
  font-size: 13.5px;
  color: rgba(203, 213, 225, 0.95);
  line-height: 1.7;
  margin-bottom: 18px;
}
.landing-side-panel-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.landing-side-panel-met {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(65, 209, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
}
.landing-side-panel-cta {
  grid-column: 1 / -1;
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--landing-glow);
  background: rgba(65, 209, 255, 0.08);
  border: 1px solid rgba(65, 209, 255, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
  cursor: pointer;
}
.landing-side-panel-cta:hover {
  background: rgba(65, 209, 255, 0.14);
  border-color: rgba(65, 209, 255, 0.35);
}
.landing-side-panel-met-label {
  font-size: 10.5px;
  color: rgba(148, 163, 184, 0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-family: var(--font-en);
}
.landing-side-panel-met-value {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}
.landing-side-panel-met-value.status-op { color: var(--landing-glow); }
.landing-side-panel-met-value.status-build { color: var(--accent-amber); }
.landing-side-panel-met-value.status-plan { color: var(--accent-green); }

.landing-side-panel-gallery-title {
  font-size: 11.5px;
  font-family: var(--font-en);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 10px;
}
.landing-side-panel-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.landing-side-panel-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--navy-700);
  display: block;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 1024px) {
  .landing-hero-title { font-size: 30px; }
  .landing-hero { padding: 28px 24px 20px; }
}

@media (max-width: 768px) {
  .landing-nav { padding: 0 16px; }
  .landing-nav-buttons { display: none; }
  .landing-nav-hamburger { display: inline-flex; }
  .landing-nav.expanded .landing-nav-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 64px;
    right: 12px;
    left: 12px;
    background: var(--navy-800);
    border: 1px solid rgba(65, 209, 255, 0.18);
    border-radius: 12px;
    padding: 10px;
    gap: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  }
  .landing-nav.expanded .landing-nav-btn { justify-content: flex-start; }

  .landing-hero { padding: 22px 18px 18px; }
  .landing-hero-title { font-size: 26px; }
  .landing-hero-subtitle-cn { font-size: 14.5px; }

  .landing-map-chips {
    top: 12px;
    padding: 4px;
    gap: 4px;
    width: calc(100% - 24px);
    justify-content: flex-start;
  }
  .landing-map-chip { padding: 5px 10px; font-size: 11.5px; }

  .landing-side-panel { width: 100vw; max-width: 100vw; }
  .landing-side-panel-metrics { grid-template-columns: 1fr 1fr; }
  .landing-map-hint { font-size: 10px; left: 10px; bottom: 10px; }
  .landing-map-legend { font-size: 10px; right: 10px; bottom: 10px; padding: 6px 8px; gap: 8px; }

  .landing-nav-logo { min-width: 100px; }
}

@media (max-width: 480px) {
  .landing-side-panel-metrics { grid-template-columns: 1fr; }
  .landing-side-panel-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* Print fallback: hide map viz */
@media print {
  .landing-map-stage { display: none; }
  .landing-side-panel { display: none; }
}

/* News strip appended below the landing stays dark so the home page reads as one theme */
body.on-landing .home-news-section {
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(65, 209, 255, 0.08);
  padding: 28px 28px 40px;
  color: var(--white);
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
body.on-landing .home-news-section .section-label { color: rgba(148,163,184,0.95); }
body.on-landing .home-news-section .home-news-more { color: var(--landing-glow); }
body.on-landing .home-news-section .home-news-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(65, 209, 255, 0.08);
  color: var(--white);
}
body.on-landing .home-news-section .home-news-card:hover {
  border-color: rgba(65, 209, 255, 0.3);
  transform: translateY(-2px);
}
body.on-landing .home-news-section .home-news-card-title { color: var(--white); }
body.on-landing .home-news-section .home-news-card-summary { color: rgba(203,213,225,0.85); }
body.on-landing .home-news-section .home-news-card-date { color: rgba(148,163,184,0.85); }
body.on-landing .home-news-section .home-news-card-img-ph { background: rgba(65,209,255,0.08); }
body.on-landing .home-news-section .home-news-loading,
body.on-landing .home-news-section .home-news-empty { color: rgba(148,163,184,0.85); }
