:root {
  --purple: #7b3ff2;
  --purple-dark: #5b28c4;
  --pink: #ff4d8d;
  --ink: #1a1430;
  --muted: #5f5872;
  --bg: #ffffff;
  --soft: #f6f2fd;
  --border: #e9e3f5;
  --radius: 14px;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  color: var(--ink);
}
.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
}
.nav-links a { color: var(--muted); font-weight: 600; margin-left: 22px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 50% -120px, #efe6ff 0%, #fff 70%);
  padding: 74px 0 60px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  margin: 0 0 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero .grad {
  background: linear-gradient(120deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 30px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(120deg, var(--purple), var(--pink));
  color: #fff;
  font-weight: 800;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 16px;
}
.cta:hover { text-decoration: none; opacity: 0.94; }
.cta.ghost {
  background: #fff;
  color: var(--purple-dark);
  border: 1px solid var(--border);
  margin-left: 10px;
}

/* Feature grid */
.section { padding: 64px 0; }
.section h2 {
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  margin: 0 0 8px;
}
.section .sub {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 42px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card .ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--border);
}
.card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Banner */
.banner {
  background: linear-gradient(120deg, var(--purple), var(--pink));
  color: #fff;
  text-align: center;
  border-radius: 22px;
  padding: 50px 26px;
  margin: 20px 0;
}
.banner h2 { color: #fff; }
.banner p { opacity: 0.92; max-width: 520px; margin: 0 auto 24px; }
.banner .cta { background: #fff; color: var(--purple-dark); }

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.foot-links a { color: var(--muted); margin-left: 18px; }

/* Legal / article pages */
.legal { padding: 48px 0 72px; }
.legal .doc { max-width: 780px; margin: 0 auto; }
.legal h1 { font-size: 34px; font-weight: 900; margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin: 0 0 28px; font-size: 14px; }
.legal h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 30px 0 8px;
  padding-top: 8px;
}
.legal h3 { font-size: 16px; font-weight: 800; margin: 18px 0 6px; }
.legal p, .legal li { color: #37324a; }
.legal ul { padding-left: 22px; }
.legal a { text-decoration: underline; }
.callout {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14px;
  color: var(--muted);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1ecfb;
    --muted: #a79fc0;
    --bg: #120e1f;
    --soft: #1b1530;
    --border: #2c2444;
  }
  header.site { background: rgba(18, 14, 31, 0.9); }
  .card .ico { background: #241c3d; }
  .hero { background: radial-gradient(1200px 500px at 50% -120px, #241a44 0%, #120e1f 70%); }
  .legal p, .legal li { color: #d6cfe8; }
}
