:root {
  --bg: #0a0f17;
  --bg-2: #0d141e;
  --surface: #111a26;
  --surface-2: #16212f;
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.3);
  --text: #e8eef8;
  --muted: #93a4bd;
  --dim: #6b7c95;
  --accent: #4cc2ff;
  --accent-soft: rgba(76, 194, 255, 0.12);
  --amber: #ffb454;
  --ok: #4ade80;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 620; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #04121c; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 15, 23, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.brand span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 0.94rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.header-cta { margin-left: 6px; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong);
  color: var(--text); border-radius: 8px; width: 42px; height: 38px; cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 0 auto; position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-size: 0.95rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04121c; }
.btn-primary:hover { background: #6ed0ff; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }

/* Nav CTA must win over ".nav a" (higher specificity) */
.nav a.btn { font-size: 0.88rem; font-weight: 600; }
.nav a.btn-primary { color: #04121c; }
.nav a.btn-ghost { color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 90%;
  background:
    radial-gradient(560px 320px at 18% 20%, rgba(76, 194, 255, 0.16), transparent 70%),
    radial-gradient(480px 300px at 82% 10%, rgba(255, 180, 84, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.hero p.lead { color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.16rem); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 34px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 26px; border-top: 1px solid var(--line); }
.stat strong { display: block; font-size: 1.32rem; font-weight: 650; letter-spacing: -0.02em; }
.stat span { font-size: 0.8rem; color: var(--dim); }

.hero-visual { position: relative; }
.hero-card {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #0e1621;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.hero-card img { width: 100%; height: auto; }
.hero-glow {
  position: absolute; inset: 12% 8% -8%; z-index: -1;
  background: radial-gradient(closest-side, rgba(76, 194, 255, 0.22), transparent);
  filter: blur(30px);
}

/* ---------- Section ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Product cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card h3 { margin: 14px 0 8px; }
.card p { color: var(--muted); font-size: 0.94rem; flex: 1; }
.card .card-link { margin-top: 18px; font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; }
.card-link::after { content: "→"; transition: transform 0.15s ease; }
.card:hover .card-link::after { transform: translateX(3px); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}
.badge-live { color: var(--ok); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
.badge-dev { color: var(--amber); border-color: rgba(255, 180, 84, 0.35); background: rgba(255, 180, 84, 0.08); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.card-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.card-icon svg { width: 24px; height: 24px; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.feature h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.feature-num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); margin-bottom: 14px; letter-spacing: 0.08em; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0e1621; }
.gallery figure:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Spec table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.spec { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 0.92rem; }
table.spec th, table.spec td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec thead th { position: sticky; top: 0; background: var(--surface-2); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
table.spec tbody th { width: 26%; font-weight: 550; color: var(--muted); }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: 0; }
table.spec tbody tr:hover { background: rgba(255, 255, 255, 0.015); }
.spec-note { color: var(--dim); font-size: 0.82rem; margin-top: 14px; }

/* ---------- Chips ---------- */
.chip-group { margin-bottom: 26px; }
.chip-group h4 { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 0.84rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }

/* ---------- Use cases ---------- */
.usecases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.usecase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.usecase .tag { font-family: var(--mono); font-size: 0.76rem; color: var(--accent); letter-spacing: 0.06em; }
.usecase h3 { margin: 10px 0 8px; font-size: 1.08rem; }
.usecase p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.usecase ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }
.usecase li { margin: 4px 0; }

/* ---------- Callout ---------- */
.callout {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 20px 22px; margin: 28px 0;
}
.callout p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.callout strong { color: var(--text); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.94rem; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 3px; }

/* ---------- Breadcrumb / page hero ---------- */
.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(76,194,255,0.06), transparent); }
.breadcrumb { font-size: 0.84rem; color: var(--dim); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p { color: var(--muted); max-width: 60ch; margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, rgba(76,194,255,0.14), rgba(255,180,84,0.07));
  border: 1px solid var(--line-strong); border-radius: 20px; padding: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 46px 0 34px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.footer-grid p { color: var(--dim); font-size: 0.86rem; max-width: 34em; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); font-size: 0.9rem; padding: 5px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--dim); font-size: 0.8rem; }

/* ---------- Language switch ---------- */
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  color: var(--muted); font-size: 0.82rem; font-weight: 600; white-space: nowrap;
}
.lang-switch:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }

/* ---------- Reveal (only when JS is enabled) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .cards { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .usecases { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .gallery figure:first-child { grid-row: auto; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .nav.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px 24px 18px;
  }
  .nav.open a { padding: 11px 0; width: 100%; font-size: 1rem; }
  .nav.open .lang-switch { border: 0; padding: 11px 0; justify-content: flex-start; height: auto; min-width: 0; }
  .nav.open .header-cta { display: inline-flex; margin: 14px 0 0; width: 100%; }
  .header-cta { display: none; }
  .nav-toggle { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 62px 0; }
  .cta-band { padding: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}