/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #050e1a;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== CSS VARIABLES ===== */
:root {
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  --amber: #f59e0b;
  --green: #10b981;
  --bg0: #050e1a;
  --bg1: #091525;
  --bg2: #0f1f38;
  --bg3: #142444;
  --border: rgba(59,130,246,0.18);
  --text1: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --grad: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --grad2: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  --glow: 0 0 40px rgba(59,130,246,0.25);
}

/* ===== UTILITY ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-gradient {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient2 {
  background: var(--grad2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.3);
  color: #93c5fd;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 20px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all 0.25s; border: none;
}
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 4px 24px rgba(59,130,246,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(59,130,246,0.55); }
.btn-outline {
  background: transparent; color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.4);
}
.btn-outline:hover { background: rgba(59,130,246,0.1); border-color: var(--blue); }
.section-label {
  display: block; text-align: center;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #60a5fa; margin-bottom: 14px;
}
.section-title {
  text-align: center; font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 16px; color: var(--text1);
}
.section-sub {
  text-align: center; font-size: 1.05rem; color: var(--text2);
  max-width: 600px; margin: 0 auto 60px;
}

/* ===== ANIMATIONS ===== */
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes pulse-glow { 0%,100%{box-shadow:0 0 20px rgba(59,130,246,0.2)} 50%{box-shadow:0 0 50px rgba(59,130,246,0.5)} }
@keyframes grad-move {
  0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%}
}
@keyframes fadeUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
@keyframes spin-slow { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.fade-up { opacity: 0; }
.fade-up.visible { animation: fadeUp 0.65s ease forwards; }
.fade-up:nth-child(1){animation-delay:0s}
.fade-up:nth-child(2){animation-delay:0.08s}
.fade-up:nth-child(3){animation-delay:0.16s}
.fade-up:nth-child(4){animation-delay:0.24s}
.fade-up:nth-child(5){animation-delay:0.32s}
.fade-up:nth-child(6){animation-delay:0.40s}
.fade-up:nth-child(7){animation-delay:0.48s}
.fade-up:nth-child(8){animation-delay:0.56s}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(5,14,26,0.8); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 800; color: var(--text1);
}
.nav-logo .logo-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.logo-img {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  display: block;
}
.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem; font-weight: 500; color: var(--text2);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text1); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-btn {
  background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd; font-size: 0.82rem; font-weight: 600;
  padding: 5px 14px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.lang-btn:hover { background: rgba(59,130,246,0.2); }
.nav-cta { padding: 8px 20px; font-size: 0.88rem; }
.nav-mobile-btn {
  display: none; background: none; border: none; color: var(--text2);
  font-size: 1.4rem; cursor: pointer; padding: 4px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding-top: 80px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,0.1) 0%, transparent 60%),
              radial-gradient(ellipse 50% 40% at 10% 90%, rgba(6,182,212,0.08) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-badge { margin-bottom: 24px; }
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 900;
  line-height: 1.08; margin-bottom: 22px; color: var(--text1);
}
.hero-sub {
  font-size: 1.15rem; color: var(--text2); line-height: 1.7; margin-bottom: 36px;
  max-width: 520px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.hero-stat-item { }
.hero-stat-num {
  font-size: 1.6rem; font-weight: 800; color: var(--text1);
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stat-label { font-size: 0.8rem; color: var(--text3); margin-top: 2px; }

/* Hero Visual */
.hero-visual { position: relative; }
.hero-device-frame {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5), var(--glow);
  animation: float 6s ease-in-out infinite;
}
.device-header {
  background: var(--bg3); padding: 12px 18px;
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border);
}
.device-dots { display: flex; gap: 6px; }
.device-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.device-dots span:nth-child(1) { background: #ff5f57; }
.device-dots span:nth-child(2) { background: #febc2e; }
.device-dots span:nth-child(3) { background: #28c840; }
.device-title-bar {
  flex: 1; text-align: center; font-size: 0.78rem; color: var(--text3); font-weight: 500;
}
.device-body { padding: 20px; }
.db-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.db-card {
  background: var(--bg3); border-radius: 10px; padding: 14px 12px;
  border: 1px solid var(--border);
}
.db-card-label { font-size: 0.68rem; color: var(--text3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.db-card-val { font-size: 1.1rem; font-weight: 700; }
.db-card-val.green { color: #34d399; }
.db-card-val.blue { color: #60a5fa; }
.db-card-val.amber { color: #fbbf24; }
.db-chart-label { font-size: 0.72rem; color: var(--text3); margin-bottom: 8px; letter-spacing: 0.05em; }
.db-bars { display: flex; align-items: flex-end; gap: 5px; height: 60px; margin-bottom: 14px; }
.db-bar {
  flex: 1; border-radius: 3px 3px 0 0; transition: height 0.3s;
  background: linear-gradient(to top, rgba(59,130,246,0.6), rgba(6,182,212,0.6));
}
.db-devices { }
.db-device-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.78rem;
}
.db-device-row:last-child { border: none; }
.db-status-dot { width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; display: inline-block; }
.db-status-dot.on { background: #34d399; box-shadow: 0 0 6px #34d399; }
.db-status-dot.off { background: #f87171; }
.db-device-name { color: var(--text2); display: flex; align-items: center; }
.db-device-rev { color: #60a5fa; font-weight: 600; }
.hero-float-card {
  position: absolute; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  font-size: 0.82rem;
}
.hero-float-card-icon { font-size: 1.3rem; }
.hero-float-card-text { }
.hero-float-card-text strong { display: block; color: var(--text1); font-weight: 600; }
.hero-float-card-text span { color: var(--text3); font-size: 0.72rem; }
.fc-1 { top: -24px; right: -20px; animation: float 5s ease-in-out infinite; animation-delay: 1s; }
.fc-2 { bottom: 30px; left: -30px; animation: float 5s ease-in-out infinite; animation-delay: 2.5s; }

/* ===== MARQUEE STRIP ===== */
.strip {
  background: var(--bg1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 18px 0; overflow: hidden;
}
.strip-track {
  display: flex; gap: 0; white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.strip-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.strip-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 36px; font-size: 0.85rem; font-weight: 600; color: var(--text3);
}
.strip-item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.strip-item .icon { font-size: 1rem; }

/* ===== STATS ===== */
.stats-section { padding: 80px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.stat-card {
  background: var(--bg1); padding: 40px 30px; text-align: center;
  border: 1px solid var(--border); position: relative; overflow: hidden;
  transition: border-color 0.3s;
}
.stat-card:hover { border-color: rgba(59,130,246,0.4); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 2px; background: var(--grad);
}
.stat-num {
  font-size: 3rem; font-weight: 900; line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.stat-label { font-size: 0.88rem; color: var(--text2); font-weight: 500; }
.stat-desc { font-size: 0.75rem; color: var(--text3); margin-top: 4px; }

/* ===== FEATURES ===== */
.features-section { padding: 100px 0; background: var(--bg1); }
.features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.feat-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 24px; transition: all 0.3s; position: relative; overflow: hidden;
}
.feat-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 16px;
  background: var(--grad); opacity: 0; transition: opacity 0.3s;
  z-index: 0;
}
.feat-card:hover { transform: translateY(-4px); border-color: rgba(59,130,246,0.4); box-shadow: var(--glow); }
.feat-card > * { position: relative; z-index: 1; }
.feat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 18px;
}
.feat-title { font-size: 1.05rem; font-weight: 700; color: var(--text1); margin-bottom: 10px; }
.feat-desc { font-size: 0.85rem; color: var(--text2); line-height: 1.65; }
.feat-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.feat-tag {
  font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 4px;
  background: rgba(59,130,246,0.1); color: #93c5fd; border: 1px solid rgba(59,130,246,0.2);
}

/* ===== HOW IT WORKS ===== */
.how-section { padding: 100px 0; }
.how-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative;
}
.how-steps::before {
  content: ''; position: absolute; top: 36px; left: calc(16.66% + 20px); right: calc(16.66% + 20px);
  height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan));
  z-index: 0;
}
.how-step {
  text-align: center; padding: 0 30px; position: relative; z-index: 1;
}
.how-step-num {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg2); border: 2px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 900; color: #60a5fa;
  margin: 0 auto 24px; position: relative;
  box-shadow: 0 0 24px rgba(59,130,246,0.3);
}
.how-step-icon { font-size: 1.8rem; }
.how-step-title { font-size: 1.1rem; font-weight: 700; color: var(--text1); margin-bottom: 10px; }
.how-step-desc { font-size: 0.85rem; color: var(--text2); line-height: 1.7; }

/* ===== PLATFORM HIERARCHY ===== */
.hierarchy-section { padding: 100px 0; background: var(--bg1); }
.hierarchy-diagram {
  display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 60px;
}
.h-level {
  display: flex; gap: 16px; justify-content: center; width: 100%;
}
.h-node {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 28px;
  text-align: center; min-width: 160px;
  position: relative; transition: all 0.3s;
}
.h-node:hover { border-color: var(--blue); transform: scale(1.03); }
.h-node-icon { font-size: 1.6rem; margin-bottom: 8px; }
.h-node-title { font-size: 0.88rem; font-weight: 700; color: var(--text1); }
.h-node-sub { font-size: 0.73rem; color: var(--text3); margin-top: 3px; }
.h-connector {
  display: flex; justify-content: center;
  height: 36px; position: relative;
}
.h-connector::before {
  content: ''; position: absolute;
  width: 2px; height: 100%;
  background: linear-gradient(to bottom, rgba(59,130,246,0.4), rgba(6,182,212,0.4));
  top: 0; left: 50%;
}
.h-node.platform { border-color: rgba(139,92,246,0.5); }
.h-node.platform .h-node-icon { filter: drop-shadow(0 0 8px rgba(139,92,246,0.6)); }
.h-node.channel { border-color: rgba(59,130,246,0.5); }
.h-node.merchant { border-color: rgba(6,182,212,0.5); }
.h-node.user-node { border-color: rgba(16,185,129,0.5); }

/* ===== USE CASES ===== */
.usecases-section { padding: 100px 0; }
.usecases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.uc-card {
  background: var(--bg1); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px; display: flex; gap: 24px; align-items: flex-start;
  transition: all 0.3s; overflow: hidden; position: relative;
}
.uc-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.04), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.uc-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-3px); box-shadow: var(--glow); }
.uc-card:hover::before { opacity: 1; }
.uc-emoji { font-size: 2.8rem; line-height: 1; flex-shrink: 0; }
.uc-content { }
.uc-title { font-size: 1.1rem; font-weight: 700; color: var(--text1); margin-bottom: 8px; }
.uc-desc { font-size: 0.88rem; color: var(--text2); line-height: 1.65; margin-bottom: 16px; }
.uc-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.uc-tag {
  font-size: 0.72rem; padding: 3px 10px; border-radius: 20px;
  background: rgba(6,182,212,0.1); color: #67e8f9; border: 1px solid rgba(6,182,212,0.2);
  font-weight: 500;
}

/* ===== OPEN API ===== */
.api-section { padding: 100px 0; background: var(--bg1); }
.api-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.api-code-block {
  background: #020913; border: 1px solid rgba(59,130,246,0.2);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.code-header {
  background: var(--bg3); padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(59,130,246,0.15);
}
.code-filename { font-size: 0.78rem; color: var(--text3); font-family: 'SF Mono', 'Fira Code', monospace; }
.code-lang { font-size: 0.72rem; background: rgba(59,130,246,0.15); color: #93c5fd; padding: 2px 8px; border-radius: 4px; }
.code-body { padding: 24px; font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 0.82rem; line-height: 1.8; overflow-x: auto; }
.code-body .kw { color: #c792ea; }
.code-body .str { color: #c3e88d; }
.code-body .num { color: #f78c6c; }
.code-body .cmt { color: #546e7a; font-style: italic; }
.code-body .key { color: #82aaff; }
.code-body .fn { color: #82aaff; }
.code-body .url { color: #89ddff; }
.api-features { display: grid; gap: 18px; }
.api-feature {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px;
  transition: border-color 0.25s;
}
.api-feature:hover { border-color: rgba(59,130,246,0.4); }
.api-feature-icon {
  width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
  background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.api-feature-title { font-size: 0.9rem; font-weight: 700; color: var(--text1); margin-bottom: 4px; }
.api-feature-desc { font-size: 0.8rem; color: var(--text2); line-height: 1.5; }

/* ===== CTA ===== */
.cta-section {
  padding: 100px 0; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.15));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(59,130,246,0.1), transparent);
}
.cta-inner { position: relative; z-index: 1; text-align: center; }
.cta-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; margin-bottom: 18px; }
.cta-sub { font-size: 1.1rem; color: var(--text2); margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== TECH STRIP ===== */
.tech-section { padding: 60px 0; }
.tech-inner { display: flex; align-items: center; gap: 48px; justify-content: center; flex-wrap: wrap; }
.tech-label { font-size: 0.8rem; color: var(--text3); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.tech-items { display: flex; gap: 32px; flex-wrap: wrap; align-items: center; }
.tech-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; font-weight: 600; color: var(--text3);
  padding: 8px 18px; border-radius: 8px;
  background: var(--bg1); border: 1px solid var(--border);
  transition: all 0.25s;
}
.tech-item:hover { border-color: rgba(59,130,246,0.4); color: var(--text2); }
.tech-item span { font-size: 1.1rem; }

/* ===== FOOTER ===== */
.footer { background: var(--bg1); border-top: 1px solid var(--border); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p { font-size: 0.85rem; color: var(--text3); line-height: 1.7; max-width: 280px; }
.footer-col-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text2); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.85rem; color: var(--text3); transition: color 0.2s; }
.footer-links a:hover { color: #60a5fa; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 0.8rem; color: var(--text3);
}
.footer-bottom a { color: var(--text3); transition: color 0.2s; }
.footer-bottom a:hover { color: #60a5fa; }

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .how-steps { grid-template-columns: 1fr; gap: 32px; }
  .how-steps::before { display: none; }
  .api-inner { grid-template-columns: 1fr; }
  .usecases-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .hierarchy-section .h-level { flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-btns { flex-direction: column; }
  .cta-btns { flex-direction: column; align-items: center; }
}

/* Mobile nav */
.mobile-menu {
  display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 999;
  background: rgba(5,14,26,0.97); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); padding: 20px 24px;
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block; padding: 12px 8px; color: var(--text2);
  font-size: 1rem; font-weight: 500; border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--text1); }
.mobile-menu .mobile-lang-btn {
  margin-top: 16px; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd; font-size: 0.9rem; font-weight: 600;
  padding: 10px 20px; border-radius: 8px; cursor: pointer; text-align: center;
}

/* ===== PAGE HERO (interior pages) ===== */
.page-hero {
  padding: 160px 0 80px; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.15) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139,92,246,0.08) 0%, transparent 60%);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900;
  line-height: 1.15; margin-bottom: 16px; color: var(--text1);
}
.page-hero-sub {
  font-size: 1.1rem; color: var(--text2); max-width: 580px;
  margin: 0 auto 36px; line-height: 1.7;
}
.page-hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== NAV ACTIVE STATE ===== */
.nav-links a.active { color: var(--text1); }

/* ===== FEATURES PAGE ===== */
.feat-deep-section { padding: 80px 0; }
.feat-deep-section.alt { background: var(--bg1); }
.feat-deep-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px;
}
.feat-deep-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 26px; transition: all 0.3s;
}
.feat-deep-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-4px); box-shadow: var(--glow); }
.feat-deep-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px;
}
.feat-deep-sub {
  font-size: 0.72rem; font-weight: 700; color: #60a5fa;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}
.feat-deep-title { font-size: 1.05rem; font-weight: 700; color: var(--text1); margin-bottom: 10px; }
.feat-deep-desc { font-size: 0.84rem; color: var(--text2); line-height: 1.7; margin-bottom: 16px; }
.feat-bullets { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feat-bullets li {
  font-size: 0.81rem; color: var(--text2);
  display: flex; align-items: flex-start; gap: 8px;
}
.feat-bullets li::before { content: '→'; color: #60a5fa; font-weight: 700; flex-shrink: 0; }

/* ===== PRICING PAGE ===== */
.pricing-section { padding: 80px 0; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px;
}
.price-card {
  background: var(--bg1); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px 28px; position: relative; transition: all 0.3s;
}
.price-card:hover { transform: translateY(-4px); border-color: rgba(59,130,246,0.4); }
.price-card.featured {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.06));
  border-color: rgba(59,130,246,0.5); box-shadow: var(--glow);
}
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 4px 16px; border-radius: 20px; white-space: nowrap; letter-spacing: 0.05em;
}
.price-tier {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #60a5fa; margin-bottom: 10px;
}
.price-name { font-size: 1.7rem; font-weight: 900; color: var(--text1); margin-bottom: 8px; }
.price-desc { font-size: 0.84rem; color: var(--text2); line-height: 1.55; margin-bottom: 24px; min-height: 52px; }
.price-amount-row { display: flex; align-items: flex-end; gap: 4px; margin-bottom: 4px; }
.price-currency { font-size: 1.2rem; font-weight: 700; color: var(--text1); margin-bottom: 6px; }
.price-amount { font-size: 2.8rem; font-weight: 900; line-height: 1; color: var(--text1); }
.price-period { font-size: 0.82rem; color: var(--text3); margin-bottom: 4px; }
.price-device-limit {
  font-size: 0.78rem; color: #60a5fa; font-weight: 600;
  padding: 10px 0; margin-bottom: 24px;
  border-top: 1px solid var(--border); margin-top: 12px;
}
.price-features-list { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 32px; }
.price-features-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.84rem; color: var(--text2); }
.price-check { color: #34d399; flex-shrink: 0; margin-top: 2px; }
.price-x { color: var(--text3); flex-shrink: 0; margin-top: 2px; }
.price-cta { width: 100%; text-align: center; display: block; }
.price-note { font-size: 0.75rem; color: var(--text3); margin-top: 10px; text-align: center; }

.pricing-note-bar {
  margin-top: 48px; text-align: center;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 24px; font-size: 0.85rem; color: var(--text2);
}

/* FAQ */
.pricing-faq { padding: 80px 0; background: var(--bg1); }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.faq-item {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 26px;
  transition: border-color 0.25s;
}
.faq-item:hover { border-color: rgba(59,130,246,0.3); }
.faq-q { font-size: 0.93rem; font-weight: 700; color: var(--text1); margin-bottom: 10px; }
.faq-a { font-size: 0.83rem; color: var(--text2); line-height: 1.65; }

/* ===== CONTACT PAGE ===== */
.contact-section { padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-form-title { font-size: 1.2rem; font-weight: 800; color: var(--text1); margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--text2);
  margin-bottom: 6px; letter-spacing: 0.03em;
}
.form-control {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text1); font-size: 0.9rem;
  padding: 11px 16px; transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit; outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.form-control::placeholder { color: var(--text3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 130px; }
.form-submit { width: 100%; margin-top: 6px; padding: 14px; font-size: 1rem; }
.form-note { font-size: 0.75rem; color: var(--text3); margin-top: 10px; text-align: center; }
.contact-success {
  display: none; background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3);
  border-radius: 12px; padding: 20px; text-align: center;
  color: #34d399; font-weight: 600; margin-top: 16px; font-size: 0.9rem;
}
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info-title { font-size: 1.2rem; font-weight: 800; color: var(--text1); margin-bottom: 10px; }
.contact-info-intro { font-size: 0.88rem; color: var(--text2); line-height: 1.65; margin-bottom: 24px; }
.contact-info-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
  display: flex; gap: 14px; align-items: flex-start; transition: border-color 0.25s;
}
.contact-info-card:hover { border-color: rgba(59,130,246,0.35); }
.ci-icon {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.ci-label { font-size: 0.72rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.ci-value { font-size: 0.92rem; color: var(--text1); font-weight: 600; margin-bottom: 2px; }
.ci-sub { font-size: 0.78rem; color: var(--text2); }

/* ===== API PAGE ===== */
.api-page-section { padding: 80px 0; }
.api-page-section.alt { background: var(--bg1); }
.api-quick-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; margin-top: 56px;
}
.api-quick-steps::before {
  content: ''; position: absolute; top: 36px;
  left: calc(16.66% + 20px); right: calc(16.66% + 20px);
  height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan)); z-index: 0;
}
.api-qs-step { text-align: center; padding: 0 28px; position: relative; z-index: 1; }
.api-qs-num {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg2); border: 2px solid var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  margin: 0 auto 20px; box-shadow: 0 0 24px rgba(59,130,246,0.3);
}
.api-qs-title { font-size: 1rem; font-weight: 700; color: var(--text1); margin-bottom: 8px; }
.api-qs-desc { font-size: 0.83rem; color: var(--text2); line-height: 1.65; }

.api-endpoints-wrap { margin-top: 40px; overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }
.api-endpoints-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.api-endpoints-table th {
  text-align: left; padding: 12px 18px;
  background: var(--bg3); color: var(--text2);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.api-endpoints-table td { padding: 14px 18px; border-bottom: 1px solid rgba(59,130,246,0.07); color: var(--text2); }
.api-endpoints-table tr:last-child td { border-bottom: none; }
.api-endpoints-table tr:hover td { background: rgba(59,130,246,0.04); }
.api-method {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px;
  display: inline-block;
}
.api-method.get { background: rgba(16,185,129,0.15); color: #34d399; }
.api-method.post { background: rgba(59,130,246,0.15); color: #93c5fd; }
.api-method.mqtt { background: rgba(245,158,11,0.15); color: #fbbf24; }
.api-path { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.82rem; color: #89ddff; }

.api-mqtt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.api-mqtt-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 24px;
}
.api-mqtt-card-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #fbbf24; margin-bottom: 8px;
}
.api-mqtt-card-title { font-size: 0.95rem; font-weight: 700; color: var(--text1); margin-bottom: 8px; }
.api-mqtt-topic {
  font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.78rem;
  color: #89ddff; background: var(--bg3); border-radius: 6px; padding: 6px 10px;
  margin-bottom: 10px; display: inline-block;
}
.api-mqtt-card p { font-size: 0.82rem; color: var(--text2); line-height: 1.6; }

.api-code-tabs { margin-top: 40px; }
.api-tab-btns {
  display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 0;
}
.api-tab-btn {
  background: none; border: none; padding: 10px 20px;
  font-size: 0.82rem; font-weight: 600; color: var(--text3);
  cursor: pointer; transition: all 0.2s;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit;
}
.api-tab-btn.active { color: #60a5fa; border-bottom-color: var(--blue); }
.api-tab-content { display: none; }
.api-tab-content.active { display: block; }

.api-auth-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: 32px; margin-top: 40px;
}
.api-auth-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.api-auth-step { }
.api-auth-step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #fff; margin-bottom: 10px;
}
.api-auth-step-title { font-size: 0.88rem; font-weight: 700; color: var(--text1); margin-bottom: 6px; }
.api-auth-step-desc { font-size: 0.8rem; color: var(--text2); line-height: 1.6; }

/* ===== API INTEGRATION FLOW (index.html) ===== */
.api-flow-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 0;
  margin-top: 40px;
}
.api-flow-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.api-flow-card:hover { border-color: var(--blue); transform: translateY(-4px); }
.api-flow-num {
  font-size: 1.9rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  display: block;
}
.api-flow-title { font-size: 1rem; font-weight: 700; color: var(--text1); margin-bottom: 10px; }
.api-flow-desc { font-size: 0.82rem; color: var(--text2); line-height: 1.65; }
.api-flow-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--blue);
  padding: 0 8px;
  margin-top: 28px;
  opacity: 0.6;
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 1024px) {
  .feat-deep-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .faq-grid { grid-template-columns: 1fr; }
  .api-auth-steps { grid-template-columns: 1fr; }
  .api-mqtt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .api-flow-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .api-flow-sep { display: none; }
}
@media (max-width: 768px) {
  .page-hero { padding: 120px 0 60px; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-group-row { grid-template-columns: 1fr; }
  .api-quick-steps { grid-template-columns: 1fr; gap: 32px; }
  .api-quick-steps::before { display: none; }
  .feat-deep-grid { grid-template-columns: 1fr; }
  .api-flow-grid { grid-template-columns: 1fr; }
}
