/* -------- Reset & base ------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
}

html { overflow-x: hidden; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #1f2733;
  background: #fbfbfd;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #0d1320;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1em; }

a {
  color: #3957d6;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: #1f3aac; text-decoration: underline; }

code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #f1f3f8;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: #2a3146;
}

pre {
  margin: 0;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-x: auto;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  border-radius: 0;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: #5b6577; }
.small { font-size: 0.9rem; }

/* -------- Top nav ----------------------------------------------------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 251, 253, 0.85);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid #e5e8ef;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  color: #0d1320;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, #5b6ef5, #8a4ee0);
  padding: 5px 8px;
  border-radius: 6px;
  letter-spacing: -0.05em;
}

.brand-text strong { font-weight: 700; }

.topnav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topnav nav a {
  color: #3a4254;
  font-size: 0.94rem;
  font-weight: 500;
}

.topnav nav a:hover {
  color: #0d1320;
  text-decoration: none;
}

.nav-cta {
  border: 1px solid #d8dde7;
  padding: 6px 12px;
  border-radius: 6px;
  background: #fff;
}
.nav-cta:hover { border-color: #0d1320; }

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

/* -------- Hero -------------------------------------------------------- */

.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(1200px 500px at 80% -100px, rgba(91,110,245,0.10), transparent 60%),
    radial-gradient(800px 400px at 0% 0%, rgba(138,78,224,0.07), transparent 60%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 48px 0 32px; }
}

.eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: #5b6ef5;
  background: rgba(91,110,245,0.10);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #5b6ef5, #8a4ee0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 1.12rem;
  color: #3a4254;
  max-width: 38ch;
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: #0d1320;
  color: #fff;
  box-shadow: 0 6px 20px -8px rgba(13,19,32,0.6);
}
.btn-primary:hover { background: #1c2433; color: #fff; }

.btn-ghost {
  background: #fff;
  color: #0d1320;
  border: 1px solid #d8dde7;
}
.btn-ghost:hover { border-color: #0d1320; color: #0d1320; }

.hero-badges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #5b6577;
  font-size: 0.88rem;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.dot.large { width: 12px; height: 12px; }
.dot.mac   { background: #0091ea; }
.dot.linux { background: #f59e0b; }
.dot.win   { background: #16a34a; }

.hero-card {
  background: #0d1320;
  color: #e6e9f2;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 30px 60px -30px rgba(13,19,32,0.45),
              0 8px 20px -10px rgba(13,19,32,0.25);
  border: 1px solid #1c2433;
  overflow: hidden;
}

.hero-card pre {
  background: transparent;
  color: inherit;
}

/* -------- Blocks ------------------------------------------------------ */

main { padding: 24px 0 80px; }

.block {
  padding: 56px 0;
  border-top: 1px solid #ebeef4;
}

.block.alt-bg {
  background: #f4f6fb;
  margin: 0 -100vw;
  padding-left: 100vw;
  padding-right: 100vw;
}

/* Recover container width inside alt-bg */
.block.alt-bg > h2,
.block.alt-bg > p,
.block.alt-bg > .three-col,
.block.alt-bg > .demo-grid,
.block.alt-bg > .code-card,
.block.alt-bg > .callout {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.snippet-block {
  padding: 48px 0 32px;
}

.snippet-header {
  text-align: center;
  margin-bottom: 28px;
}

.snippet-header p {
  color: #5b6577;
  max-width: 56ch;
  margin: 0 auto;
}

.step-pill {
  display: inline-block;
  background: linear-gradient(135deg, #5b6ef5, #8a4ee0);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* -------- Code card -------------------------------------------------- */

.code-card {
  background: #0d1320;
  border-radius: 12px;
  border: 1px solid #1c2433;
  overflow: hidden;
  box-shadow: 0 24px 50px -28px rgba(13,19,32,0.45);
  max-width: 760px;
  margin: 0 auto;
}

.code-card-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161d2e;
  padding: 8px 14px;
  border-bottom: 1px solid #1c2433;
}

.code-card-file {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: #9aa3b8;
  letter-spacing: 0.02em;
}

.copy-btn {
  background: transparent;
  border: 1px solid #2d3754;
  color: #c9cee0;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.copy-btn:hover {
  background: #1c2433;
  border-color: #475070;
  color: #fff;
}
.copy-btn.copied {
  border-color: #16a34a;
  color: #4ade80;
}

.code-card pre {
  padding: 20px 22px;
}

/* Make highlight.js fit the card */
.hljs {
  background: transparent !important;
  padding: 0 !important;
}

.alt-build {
  max-width: 760px;
  margin: 16px auto 0;
}

.alt-build summary {
  cursor: pointer;
  color: #5b6577;
  font-size: 0.92rem;
  padding: 8px 0;
  user-select: none;
}
.alt-build[open] summary { margin-bottom: 10px; }

/* -------- Callouts --------------------------------------------------- */

.callout {
  max-width: 760px;
  margin: 22px auto 0;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.callout-info {
  background: #eef3ff;
  border-left: 3px solid #5b6ef5;
  color: #2a3458;
}

.callout-warn {
  background: #fff5e6;
  border-left: 3px solid #f59e0b;
  color: #5a3a08;
}

/* -------- Platform grid ---------------------------------------------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

@media (max-width: 820px) {
  .platform-grid { grid-template-columns: 1fr; }
}

.platform-card {
  background: #fff;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  padding: 22px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.platform-card:hover {
  border-color: #c9d0e0;
  box-shadow: 0 14px 30px -20px rgba(13,19,32,0.15);
  transform: translateY(-2px);
}

.platform-card header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.platform-card h3 {
  margin: 0;
}

.subtle {
  font-size: 0.82rem;
  color: #8a92a6;
  font-family: "JetBrains Mono", monospace;
}

.platform-card dl {
  margin: 0;
}
.platform-card dt {
  font-weight: 600;
  font-size: 0.85rem;
  color: #3a4254;
  margin-top: 10px;
}
.platform-card dd {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: #5b6577;
}

/* -------- Three column ----------------------------------------------- */

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .three-col { grid-template-columns: 1fr; }
}

.three-col > div {
  background: #fff;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.three-col h3 {
  margin-bottom: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: #0d1320;
}

.three-col h3 code {
  background: transparent;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.three-col p {
  color: #5b6577;
  font-size: 0.92rem;
  margin-bottom: 14px;
  flex: 1;
}

.three-col pre {
  background: #0d1320;
  color: #e6e9f2;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.82rem;
  border: 1px solid #1c2433;
}

/* -------- Demos ------------------------------------------------------ */

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .demo-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .demo-grid { grid-template-columns: 1fr; }
}

.demo-card {
  background: #fff;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  padding: 20px;
  display: block;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.demo-card:hover {
  text-decoration: none;
  border-color: #5b6ef5;
  box-shadow: 0 14px 30px -20px rgba(91,110,245,0.35);
  transform: translateY(-2px);
}

.demo-card h3 {
  margin-bottom: 6px;
  color: #0d1320;
}

.demo-card p {
  margin: 0;
  color: #5b6577;
  font-size: 0.92rem;
}

/* -------- Footer ----------------------------------------------------- */

.site-footer {
  border-top: 1px solid #ebeef4;
  background: #fff;
  padding: 40px 0 60px;
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  color: #5b6577;
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}

.site-footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a92a6;
  margin-bottom: 10px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer li {
  margin-bottom: 6px;
}
.site-footer a { color: #3a4254; }
.site-footer a:hover { color: #0d1320; }
