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

:root {
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-light: #eff6ff;
  --blue-mid: #dbeafe;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(59,130,246,0.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo-icon {
  width: 34px;
  height: 34px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  padding: 8px 20px;
  background: var(--blue);
  color: white !important;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px !important;
  transition: background .2s !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; color: white !important; }

/* ── HERO ── */
.hero {
  padding: 140px 24px 100px;
  text-align: center;
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--white) 100%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--blue-mid);
  color: var(--blue-dark);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
}
.hero-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(59,130,246,0.45); }
.btn-secondary {
  padding: 14px 32px;
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 28px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  background: white;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }

/* ── MOCKUP ── */
.mockup-wrap {
  max-width: 900px;
  margin: 60px auto 0;
  padding: 0 24px;
}
.mockup {
  background: white;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(59,130,246,0.15), 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}
.mockup-bar {
  background: var(--bg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dot.red { background: #ff5f57; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #28ca41; }
.mockup-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.mockup-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
}
.mockup-card-title {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mockup-device {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: white;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
}
.mockup-device-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.mockup-device-name { font-size: 12px; font-weight: 500; }
.mockup-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin: 4px 4px 0 0;
}
.mockup-chip.blue { background: var(--blue-mid); color: var(--blue-dark); }
.mockup-chip.green { background: #dcfce7; color: #16a34a; }
.mockup-chip.orange { background: #fef3c7; color: #d97706; }
.mockup-plan-item {
  padding: 8px 10px;
  background: white;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  font-size: 12px;
}
.mockup-plan-name { font-weight: 600; margin-bottom: 2px; }
.mockup-plan-sub { color: var(--text-muted); font-size: 11px; }

/* ── SECTION COMMON ── */
section { padding: 80px 24px; }
.container { max-width: 1100px; margin: 0 auto; }
.section-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--blue-mid);
  color: var(--blue-dark);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
}

/* ── FEATURES ── */
.features-bg { background: var(--bg); }
.features-header { text-align: center; margin-bottom: 56px; }
.features-header .section-desc { margin: 0 auto; }
.features-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ── HOW IT WORKS ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
}
.step {
  display: flex;
  gap: 20px;
  padding-bottom: 36px;
  position: relative;
}
.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 44px;
  bottom: 0;
  width: 2px;
  background: var(--blue-mid);
}
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: white;
  font-size: 15px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.step-content { padding-top: 6px; }
.step-content h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step-content p { font-size: 14px; color: var(--text-muted); }

.how-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.how-right {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}
.flow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}
.flow-box {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.flow-box.source { background: var(--blue-mid); color: var(--blue-dark); }
.flow-box.arrow { background: none; color: var(--text-muted); font-size: 18px; padding: 0; }
.flow-box.api { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.flow-box.ws { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.flow-box.device { background: var(--blue); color: white; }
.flow-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── SCENE ── */
.scene-bg {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  text-align: center;
}
.scene-grid {
  max-width: 830px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 48px auto 0;
}
.scene-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 24px;
  transition: background .2s;
}
.scene-card:hover { background: rgba(255,255,255,0.1); }
.scene-icon { font-size: 32px; margin-bottom: 12px; }
.scene-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.scene-card p { font-size: 13px; color: rgba(255,255,255,0.55); line-height: 1.5; }
.scene-bg .section-tag { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
.scene-bg .section-title { color: white; }
.scene-bg .section-desc {
  display: inline-block;
  text-align: center;
  color: rgba(255,255,255,0.55);
}

/* ── CTA ── */
.cta-section { background: var(--blue-light); text-align: center; }
.cta-section .section-title { margin-bottom: 14px; }
.cta-section .section-desc { margin: 0 auto 36px; }
.cta-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  background: #0f172a;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 32px 24px;
  font-size: 14px;
}
footer span { color: rgba(255,255,255,0.8); font-weight: 600; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mockup-body { grid-template-columns: 1fr; }
  .how-inner { grid-template-columns: 1fr; }
}
