/* mintus — design system */
/* ============================================================ */
:root {
  --c-bg: #ffffff;
  --c-bg-elev: #f7f8fb;
  --c-bg-soft: #eef0f6;
  --c-border: #e4e7ef;
  --c-text: #0d1226;
  --c-text-muted: #5a6378;
  --c-text-soft: #7b8294;
  --c-brand: #5b3ef7;
  --c-brand-2: #19c2c2;
  --c-brand-grad: linear-gradient(135deg, #5b3ef7 0%, #19c2c2 100%);
  --c-accent: #ffb547;
  --c-danger: #e5484d;
  --c-success: #19c280;
  --shadow-1: 0 1px 2px rgba(13, 18, 38, 0.06), 0 4px 16px rgba(13, 18, 38, 0.06);
  --shadow-2: 0 8px 30px rgba(91, 62, 247, 0.18);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --maxw: 1180px;
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  --c-bg: #0a0d1f;
  --c-bg-elev: #11142b;
  --c-bg-soft: #181c38;
  --c-border: #232846;
  --c-text: #f3f4ff;
  --c-text-muted: #a4abc4;
  --c-text-soft: #7a829c;
  --c-brand: #8a72ff;
  --c-brand-2: #2bdada;
  --c-brand-grad: linear-gradient(135deg, #8a72ff 0%, #2bdada 100%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 8px 40px rgba(138, 114, 255, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --c-bg: #0a0d1f;
    --c-bg-elev: #11142b;
    --c-bg-soft: #181c38;
    --c-border: #232846;
    --c-text: #f3f4ff;
    --c-text-muted: #a4abc4;
    --c-text-soft: #7a829c;
    --c-brand: #8a72ff;
    --c-brand-2: #2bdada;
    --c-brand-grad: linear-gradient(135deg, #8a72ff 0%, #2bdada 100%);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 8px 40px rgba(138, 114, 255, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a {
  color: var(--c-brand);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--c-brand-2); }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
  font-weight: 700;
  color: var(--c-text);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; color: var(--c-text-muted); }
ul, ol { padding-left: 1.2em; color: var(--c-text-muted); }
ul li, ol li { margin-bottom: .35em; }
code, pre, kbd { font-family: var(--font-mono); font-size: .9em; }
code { background: var(--c-bg-soft); padding: 2px 6px; border-radius: 4px; color: var(--c-text); }
pre { background: var(--c-bg-soft); padding: 16px; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--c-border); }
hr { border: 0; border-top: 1px solid var(--c-border); margin: 2.5rem 0; }
blockquote {
  margin: 1.5em 0;
  padding: .8em 1.2em;
  border-left: 3px solid var(--c-brand);
  background: var(--c-bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--c-text);
}

/* Layout helpers */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(60px, 9vw, 110px) 0; }
.section-sm { padding: 56px 0; }
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
}
.text-center { text-align: center; }
.muted { color: var(--c-text-muted); }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--c-brand);
  margin-bottom: .8em;
}
.lead { font-size: 1.15rem; color: var(--c-text-muted); }
.gradient-text {
  background: var(--c-brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-text);
  letter-spacing: -.01em;
}
.brand:hover { color: var(--c-text); }
.brand-logo {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--c-brand-grad);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: var(--c-text-muted);
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--c-text);
  background: var(--c-bg-soft);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  background: var(--c-bg-elev);
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all .15s ease;
}
.icon-btn:hover { color: var(--c-text); border-color: var(--c-brand); }
.lang-switch {
  position: relative;
}
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  font-size: .9rem;
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-bg-elev);
  font-weight: 500;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch[open] summary { color: var(--c-text); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  min-width: 160px;
  padding: 6px;
  list-style: none;
  margin: 0;
  z-index: 60;
}
.lang-menu li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--c-text-muted);
  font-size: .9rem;
}
.lang-menu li a:hover { background: var(--c-bg-soft); color: var(--c-text); }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--c-bg-elev);
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    padding: 12px 24px;
    gap: 4px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: .95rem;
  padding: 11px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-brand-grad);
  color: #fff;
  box-shadow: var(--shadow-2);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg-soft); color: var(--c-text); border-color: var(--c-brand); }
.btn-link { padding: 0; color: var(--c-brand); background: none; border: 0; font-weight: 600; }
.btn-link:hover { color: var(--c-brand-2); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero */
.hero {
  position: relative;
  padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 9vw, 110px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto auto;
  width: 60vw;
  max-width: 760px;
  height: 60vw;
  max-height: 760px;
  background: radial-gradient(closest-side, rgba(91, 62, 247, .25), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto auto -20% -10%;
  width: 50vw;
  max-width: 640px;
  height: 50vw;
  max-height: 640px;
  background: radial-gradient(closest-side, rgba(25, 194, 194, .22), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}
.hero h1 { margin-bottom: 24px; }
.hero p.lead { max-width: 640px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--c-text-soft);
}
.hero-meta strong { color: var(--c-text); display: block; font-size: 1.5rem; font-weight: 700; }

/* Cards */
.card {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all .2s ease;
}
.card:hover { border-color: var(--c-brand); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.card h3 { margin-top: 0; }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--c-brand-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 22px;
}
.card-outline { background: transparent; }

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 28px;
}
.step {
  position: relative;
  padding-left: 64px;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -4px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--c-bg-soft);
  color: var(--c-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: .95rem;
  border: 1px solid var(--c-border);
}
.step h3 { margin-bottom: .35em; }

/* Banner / CTA */
.banner {
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  background: var(--c-brand-grad);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.banner h2 { color: #fff; }
.banner p { color: rgba(255,255,255,.9); }
.banner .btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.banner .btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.banner .btn-primary { background: #fff; color: var(--c-brand); box-shadow: none; }
.banner .btn-primary:hover { color: var(--c-brand); }

/* Stripes (alternating sections) */
.stripe { background: var(--c-bg-elev); }

/* Pill / tag */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: var(--c-bg-soft);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
}
.pill-brand { background: color-mix(in srgb, var(--c-brand) 12%, transparent); border-color: color-mix(in srgb, var(--c-brand) 30%, transparent); color: var(--c-brand); }

/* Footer */
.site-footer {
  margin-top: 80px;
  padding: 64px 0 32px;
  background: var(--c-bg-elev);
  border-top: 1px solid var(--c-border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
.footer-grid h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-text-soft);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid ul a {
  color: var(--c-text-muted);
  font-size: .92rem;
}
.footer-grid ul a:hover { color: var(--c-text); }
.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .85rem;
  color: var(--c-text-soft);
}

/* Legal / long-form pages */
.legal { padding: 64px 0 80px; }
.legal-title { margin-bottom: 8px; }
.legal-meta { color: var(--c-text-soft); font-size: .9rem; margin-bottom: 40px; }
.legal-toc {
  background: var(--c-bg-elev);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 40px;
}
.legal-toc h2 { font-size: 1rem; margin: 0 0 10px; }
.legal-toc ol { margin: 0; padding-left: 1.4em; font-size: .92rem; }
.legal-toc ol a { color: var(--c-text-muted); }
.legal h2 { margin-top: 2.4em; font-size: 1.4rem; }
.legal h3 { margin-top: 1.6em; font-size: 1.1rem; }
.legal p, .legal li { font-size: .96rem; }

.app-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #0d1226;
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid #1d2240;
}
.app-badge:hover { color: #fff; background: #1a2148; }
.app-badge span small { display: block; font-size: .7rem; font-weight: 400; opacity: .75; }

.qa-block { margin-bottom: 28px; }
.qa-block h3 { color: var(--c-text); margin-bottom: 6px; }
.qa-block p { margin-bottom: 0; }

/* Tables */
table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: .92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
table.data th { background: var(--c-bg-soft); font-weight: 600; color: var(--c-text); }

/* Utility */
.no-wrap { white-space: nowrap; }
.divider { height: 1px; background: var(--c-border); margin: 40px 0; }
.callout {
  background: color-mix(in srgb, var(--c-brand) 8%, transparent);
  border-left: 3px solid var(--c-brand);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* Print */
@media print {
  .site-header, .site-footer, .hero::before, .hero::after { display: none; }
  body { color: #000; background: #fff; }
}

/* Focus visibility for accessibility */
:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: 4px; }
