/* ==========================================================================
   meshpin — landing page
   Dark theme, blue accent (#3B82F6), system font stack.
   ========================================================================== */

:root {
  --bg: #0a0f1c;
  --bg-soft: #0e1526;
  --bg-card: #111a2e;
  --bg-card-2: #16203a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6ecf7;
  --text-dim: #93a1bd;
  --text-faint: #64748f;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-grad: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --nav-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: rgba(59, 130, 246, 0.4); }

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

/* ---------------------------------- buttons ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn--sm { padding: 8px 16px; font-size: 14px; }

.btn--lg { padding: 16px 32px; font-size: 17px; }

.btn--primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.45);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ---------------------------------- navbar ---------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 15, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav__logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__links a {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  width: 46px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.lang-toggle.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  padding: 0 10px;
}

.nav__burger span {
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------- hero ---------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 72px;
  overflow: hidden;
}

.hero__bg { position: absolute; inset: 0; z-index: 0; }

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 75%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

.hero__glow--1 {
  width: 560px; height: 420px;
  top: -120px; left: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 70%);
}

.hero__glow--2 {
  width: 480px; height: 360px;
  bottom: -120px; right: -60px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.42), transparent 70%);
}

.hero__nodes .node {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  left: var(--x); top: var(--y);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
  animation: pulse 4s ease-in-out infinite;
}

.hero__nodes .node:nth-child(2n) { animation-delay: 1.2s; }
.hero__nodes .node:nth-child(3n) { animation-delay: 2.4s; }

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.25); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 600;
}

.hero__badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 760px;
}

.gradient {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-dim);
  max-width: 660px;
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.hero__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
}

.hero__platform {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
}

.hero__scroll {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.hero__scroll span {
  width: 4px; height: 9px;
  border-radius: 4px;
  background: var(--accent-2);
  animation: scroll 1.8s ease-in-out infinite;
}

@keyframes scroll {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------------------------------- sections ---------------------------------- */

.section { padding: 96px 0; }

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.2;
}

.section__lead {
  color: var(--text-dim);
  font-size: 17px;
}

/* ---------------------------------- feature cards ---------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.card__icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: inline-block;
  background: rgba(59, 130, 246, 0.14);
  border-radius: 12px;
  padding: 10px;
  line-height: 1;
}

.card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card__text {
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------------------------------- platforms matrix ---------------------------------- */

.platforms { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.matrix-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }

.matrix {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14.5px;
}

.matrix th {
  padding: 16px 18px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.matrix th:first-child { text-align: left; color: var(--text-faint); font-weight: 600; }

.matrix td {
  padding: 13px 18px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.matrix tr:last-child td { border-bottom: none; }

.matrix td:first-child {
  text-align: left;
  color: var(--text-dim);
}

.matrix tbody tr:hover { background: rgba(59, 130, 246, 0.05); }

.matrix .yes::before { content: "✓"; color: var(--green); font-weight: 800; }

.matrix .no::before { content: "—"; color: var(--text-faint); }

.matrix .warn::before { content: "▲"; color: var(--amber); font-weight: 800; }

.matrix .tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  vertical-align: 1px;
}

.matrix .tag--warn {
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber);
}

.matrix__note {
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
  margin-top: 18px;
}

/* ---------------------------------- scenes ---------------------------------- */

.scenes__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.scene {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.scene:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.scene__emoji {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 18px;
  display: inline-block;
}

.scene__title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.scene__text {
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------------------------------- steps ---------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.step:hover { transform: translateY(-4px); border-color: rgba(59, 130, 246, 0.4); }

.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 16px;
}

.step h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

.step p { color: var(--text-dim); font-size: 14.5px; }

/* ---------------------------------- CTA panel ---------------------------------- */

.getstarted { padding-bottom: 120px; }

.cta-panel {
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-panel::before {
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  width: 640px; height: 360px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.25), transparent 70%);
  pointer-events: none;
}

.cta-panel__title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta-panel__text {
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 26px;
  font-size: 16.5px;
}

.cta-panel__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* ---------------------------------- footer ---------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding-top: 56px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 48px;
}

.footer__brand {
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer__brand .nav__logo { width: 34px; height: 34px; }

.footer__name {
  font-size: 19px;
  font-weight: 700;
  margin-left: 2px;
}

.footer__tag { color: var(--text-dim); font-size: 14px; }

.footer__links {
  display: flex;
  gap: 72px;
  flex-wrap: wrap;
}

.footer__col { display: flex; flex-direction: column; gap: 10px; }

.footer__col h5 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.footer__col a {
  color: var(--text-dim);
  font-size: 14.5px;
  transition: color 0.2s ease;
}

.footer__col a:hover { color: var(--text); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--text-faint);
  font-size: 13.5px;
}

/* ---------------------------------- scroll reveal ---------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------- responsive ---------------------------------- */

@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .scenes__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(10, 15, 28, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    display: none;
  }

  .nav__links.open { display: flex; }

  .nav__links a {
    padding: 14px 16px;
    font-size: 16px;
    text-align: left;
  }

  .nav__burger { display: flex; }

  .nav__actions .btn--ghost { display: none; }

  .section { padding: 72px 0; }
  .cta-panel { padding: 40px 24px; }
}

@media (max-width: 560px) {
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 40px); }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer__links { gap: 40px; }
}

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