:root {
  --bg: #ffffff;
  --bg-alt: #f7f7fb;
  --ink: #1d1d27;
  --muted: #6b6c79;
  --line: #e7e7ee;
  --brand: #7c3aed;
  --brand-2: #8b5cf6;
  --brand-3: #6d28d9;
  --accent-soft: #f3eeff;
  --radius: 16px;
  --shadow: 0 18px 50px -22px rgba(76, 29, 149, 0.45);
  --shadow-sm: 0 6px 22px -12px rgba(20, 20, 40, 0.35);
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78em;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 5vw, 56px);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }

.nav-links a.ghost { color: var(--ink); }

.nav-links a.cta {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
  box-shadow: var(--shadow-sm);
}
.nav-links a.cta:hover { color: #fff; filter: brightness(1.05); }

@media (max-width: 720px) {
  .nav-links a:not(.cta):not(.ghost) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(48px, 9vw, 110px) clamp(18px, 5vw, 56px) 40px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -30% 0 auto 0;
  height: 620px;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(139, 92, 246, 0.22), transparent 70%),
    radial-gradient(40% 40% at 80% 10%, rgba(167, 139, 250, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 760px; margin: 0 auto; }

.hero-logo {
  filter: drop-shadow(0 16px 30px rgba(109, 40, 217, 0.35));
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  font-weight: 800;
}

.grad {
  background: linear-gradient(120deg, var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}
.btn:hover { transform: translateY(-1px); }

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
  box-shadow: var(--shadow);
}
.btn.primary:hover { filter: brightness(1.06); }

.btn.ghost {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn.big { padding: 16px 34px; font-size: 1.1rem; }

.hero-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- App window mockup ---------- */
.window {
  position: relative;
  max-width: 880px;
  margin: 54px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: left;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #f3f3f7;
  border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.window-title {
  margin-left: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  background: #fafafc;
}
.tb-btn {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-weight: 600;
}
.tb-muted { color: var(--muted); }
.tb-field {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #9a9aa6;
  background: #fff;
  min-width: 64px;
}
.tb-field.wide { min-width: 150px; }
.tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.tb-spacer { flex: 1; }

.sheet { font-size: 0.84rem; }
.sheet-row { display: grid; grid-template-columns: 54px 1fr 1.2fr 1.2fr 1fr; }
.sheet-row .cell {
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cell.idx { color: #9a9aa6; background: #fafafc; text-align: right; padding-right: 10px; }
.cell.num { color: #2b2b36; }
.sheet-row.head .cell { background: #f5f5f8; color: var(--muted); font-weight: 600; }
.sheet-row.sel .cell { background: #ede7fe; }
.sheet-row.sel .cell.idx { background: #cdbcf7; color: #43308a; }

.statusbar {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(56px, 9vw, 100px) clamp(18px, 5vw, 56px);
  max-width: 1100px;
  margin: 0 auto;
}
.section.alt {
  background: var(--bg-alt);
  max-width: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section.alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }

.section h2, .cta-band h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  text-align: center;
  font-weight: 800;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 auto 44px;
  max-width: 600px;
}

/* Features grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #d9cdf7;
  box-shadow: 0 16px 38px -20px rgba(76, 29, 149, 0.4);
}
.card .ic {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  border-radius: 12px;
  background: var(--accent-soft);
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.96rem; }

/* Performance */
.perf {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.perf-row {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.perf-row:last-child { border-bottom: none; }
.perf-key { font-weight: 700; color: var(--brand-3); }
.perf-val { color: var(--muted); }
@media (max-width: 640px) {
  .perf-row { grid-template-columns: 1fr; gap: 4px; }
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 36px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 34px;
  text-align: center;
  min-width: 170px;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(120deg, var(--brand-2), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--muted); font-size: 0.92rem; }

/* Formats */
.formats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.fmt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.fmt-ext {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--brand-3);
}
.fmt span:last-child { color: var(--muted); font-size: 0.95rem; }
.fine { text-align: center; color: var(--muted); margin-top: 24px; font-size: 0.92rem; }

/* CTA band */
.cta-band {
  text-align: center;
  padding: clamp(56px, 9vw, 96px) 24px;
  background: linear-gradient(135deg, #f3eeff, #ede7fe);
  border-top: 1px solid var(--line);
}
.cta-band p { color: var(--muted); margin: 6px 0 26px; font-size: 1.1rem; }
.cta-fine { color: var(--muted); font-size: 0.9rem; margin-top: 18px !important; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 44px 24px 54px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.made {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  margin: 0;
  font-weight: 500;
}
.made a { color: var(--brand-3); font-weight: 700; }
.made a:hover { text-decoration: underline; }
.i-heart, .i-flag { vertical-align: middle; }
.i-flag {
  border: 1px solid #d9d9e0;
  border-radius: 2px;
}
.footer-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--ink); }
