/* JetBrains.com-inspired look: near-black canvas, vivid gradient accents, bold type. */
:root {
  --bg: #19191c;
  --bg-card: #212228;
  --fg: #f4f4f4;
  --fg-dim: #a8a8b2;
  --accent-a: #ff45ed;
  --accent-b: #6b57ff;
  --accent-c: #25c7ff;
  /* The gradient above is DISPLAY ink — the headline, the brand mark. A control is not display
     ink: a button painted in it announces itself louder than the sentence that says what it
     does, and a gradient across two hues makes one button look like two. Controls take this
     single, quieter violet instead — the same family, a couple of notches down in brightness. */
  --primary: #5a4bd4;
  --primary-hover: #6a5ce6;
  --radius: 16px;
  /* One content width and one gutter for the whole page: the header, the cards and the
     footnotes all start and end on the same two vertical lines. */
  --content: 1080px;
  --gutter: 24px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, "Segoe UI", Inter, Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }

/* The bar spans the window; only its contents are bounded, so the rule under it still
   reaches both edges of the screen. */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(25, 25, 28, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid #2f3034;
}
.nav-inner {
  max-width: var(--content); margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.9rem var(--gutter);
  /* A row of links that cannot wrap is a row that pushes the page sideways on a phone —
     and a page that scrolls sideways is the one defect every visitor notices. */
  flex-wrap: wrap; row-gap: 0.6rem;
}
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand-mark {
  display: inline-block; margin-right: 0.4rem;
  background: linear-gradient(120deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav-links a { color: var(--fg-dim); font-size: 0.95rem; }
.nav-links a:hover { color: var(--fg); }
.lang-switch { display: flex; border: 1px solid #3a3b40; border-radius: 999px; overflow: hidden; }
.lang-switch button {
  background: none; border: 0; color: var(--fg-dim); padding: 0.3rem 0.8rem;
  font: inherit; font-size: 0.85rem; cursor: pointer;
}
.lang-switch button.active { background: var(--primary); color: #fff; }

/* Full width, so the plates behind it can be: the TEXT is what is 900px wide, not the section. */
.hero { padding: 6rem var(--gutter) 4rem; text-align: center; }
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.6rem); font-weight: 900; line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 1.4rem auto 2.4rem; max-width: 640px; color: var(--fg-dim); font-size: 1.15rem; }

.download-box { position: relative; display: inline-block; }
.dl-main { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.85rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; border: 0; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; transition: background-color 0.15s; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-caret { background: var(--primary); color: #fff; padding: 0.85rem 1rem; }
.btn-secondary { background: transparent; color: var(--fg); border: 1px solid #45464c; }
.btn-secondary:hover { border-color: var(--fg-dim); }
.dl-menu {
  position: absolute; left: 50%; transform: translateX(-50%); margin-top: 0.5rem;
  list-style: none; background: var(--bg-card); border: 1px solid #3a3b40;
  border-radius: 12px; overflow: hidden; min-width: 240px; text-align: left;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); z-index: 5;
}
.dl-menu a { display: block; padding: 0.7rem 1.1rem; font-size: 0.95rem; }
.dl-menu a:hover { background: #33343a; }
.version-note { margin-top: 0.9rem; color: var(--fg-dim); font-size: 0.9rem; }

/* One left edge for everything below the hero. A centred heading over a left-aligned paragraph
   is two alignments arguing in the same section; the hero is the only block on the page that is
   display type, and it is the only one that is centred. */
section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 2rem; }
.features { max-width: var(--content); margin: 0 auto; padding: 3rem var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--bg-card); border-radius: var(--radius); padding: 1.6rem;
  border: 1px solid #33343b;
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--fg-dim); font-size: 0.95rem; }

.docs { max-width: var(--content); margin: 0 auto; padding: 3rem var(--gutter) 5rem; }
.docs > p { color: var(--fg-dim); max-width: 68ch; margin: 0 0 2rem; }
.doc-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.doc-card {
  display: block; background: var(--bg-card); border: 1px solid #2f3034;
  border-radius: var(--radius); padding: 1.6rem; text-align: left; transition: border-color 0.15s;
}
.doc-card:hover { border-color: var(--primary); }
.doc-card h3 { margin-bottom: 0.4rem; }
.doc-card p { color: var(--fg-dim); font-size: 0.92rem; }

footer { border-top: 1px solid #2f3034; padding: 2rem; text-align: center; color: var(--fg-dim); font-size: 0.9rem; }
footer a { color: var(--fg); }

code, .code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  background: #101012; border: 1px solid #2f3034; border-radius: 8px;
  padding: 0.2rem 0.5rem; font-size: 0.95em;
}

/* Install command row (control site) */
.install-row { display: flex; gap: 0.5rem; justify-content: center; align-items: stretch; margin-bottom: 1rem; flex-wrap: wrap; }
.install-cmd {
  display: inline-flex; align-items: center; padding: 0.7rem 1rem; font-size: 0.95rem; border-radius: 10px;
  /* The command is one long unbreakable word; on a narrow screen it scrolls itself. */
  max-width: 100%; overflow-x: auto;
}
.install-row .btn {
  padding: 0.7rem 1.25rem; font-size: 0.95rem; border-radius: 10px;
  /* Wide enough for "Copy" AND for the tick it becomes, so confirming the copy does not
     shove the command sideways. */
  min-width: 6rem;
}

/* ---- Getting started, and the demo ------------------------------------------------------- */

/* The page has one job past the hero: show what you actually write. Code is set in the same
   monospace stack the control falls back to, so a sample here and the editor in the demo are
   recognisably the same text. */
.start, .demo { max-width: var(--content); margin: 0 auto; padding: 72px var(--gutter) 8px; }

/* The hero is centred, so its button row is. These sections are not: the heading, the lead, the
   cards and the footnote below all begin on the left content edge, and a row of buttons floating
   in the middle of them reads as a mistake. Same edge, and room to breathe on either side. */
.start .dl-main, .demo .dl-main { justify-content: flex-start; margin: 28px 0 0; }
.start .dl-main + .aside, .demo .dl-main + .aside { margin-top: 16px; }

.lead {
  color: var(--fg-dim);
  max-width: 68ch;
  margin: 0 0 24px;
}

.sample {
  background: var(--bg-card);
  border: 1px solid #2f3034;
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;         /* a long line scrolls its own block, never the page */
  margin: 0 0 16px;
}

.sample code {
  font-family: Menlo, Monaco, Consolas, "Cascadia Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  color: var(--fg);
  white-space: pre;
  background: none; border: 0; padding: 0;
}

/* A remark under a block: quieter than body text, and never a second paragraph of it. */
.aside {
  color: #85868f;
  font-size: 14px;
  max-width: 68ch;
  margin: 8px 0 0;
}

/* The demo's eight scenarios. Tighter than the feature grid — these are labels for a list of
   things to try, not an argument. */
.grid-tight .card { padding: 16px 18px; }
.grid-tight .card h3 { font-size: 15px; margin-bottom: 6px; }
.grid-tight .card p { font-size: 14px; }

/* ---- The repository, as a mark ----------------------------------------------------------- */

/* A link whose whole content is an icon needs its own hit area — the row is 1rem tall and a
   19px glyph inside it is a target the size of a full stop. */
.icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin: -6px 0; border-radius: 8px;
  color: var(--fg-dim); transition: color 0.15s, background-color 0.15s;
}
.icon-link:hover { color: var(--fg); background: #26272c; }
.icon-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
footer .icon-link { width: 26px; height: 26px; vertical-align: -8px; }

/* ---- The hero, over its own evidence ------------------------------------------------------ */

/* Four of the strongest screens, fanned behind the claim and masked away in the middle. The
   mask is what makes this a background rather than a collage: the headline sits on ground,
   and the code is only ever glimpsed at the edges of the eye. */
.hero { position: relative; overflow: hidden; }
.hero-content { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; }
.hero-stage {
  position: absolute; inset: -4% -2% auto; height: 128%; z-index: 0;
  pointer-events: none; perspective: 1600px; opacity: 0.92;
  -webkit-mask-image: radial-gradient(112% 76% at 50% 40%, transparent 24%, #000 70%);
  mask-image: radial-gradient(112% 76% at 50% 40%, transparent 24%, #000 70%);
}
.hero-stage .plate {
  position: absolute; width: min(44vw, 560px); height: auto;
  border-radius: 12px; border: 1px solid #34353c;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.plate-a { left: -7%;  top: 3%;    transform: perspective(1600px) rotateY(15deg) rotate(-3deg); }
.plate-b { right: -7%; top: 0;     transform: perspective(1600px) rotateY(-15deg) rotate(3deg); }
.plate-c { left: -2%;  bottom: 2%; transform: perspective(1600px) rotateY(12deg) rotate(2deg); width: min(36vw, 460px); }
.plate-d { right: -1%; bottom: 0;  transform: perspective(1600px) rotateY(-12deg) rotate(-2deg); width: min(36vw, 460px); }
/* A violet cast tying the plates to the brand, under the text and over nothing else. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(58% 46% at 50% 32%, rgba(107, 87, 255, 0.16), transparent 72%);
}
/* The plates are clipped by the section's edge, and a clipped photograph has a seam. This is the
   ground poured back over the top and bottom of them, so they end by fading rather than by
   stopping. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(25, 25, 28, 0) 13%,
                              rgba(25, 25, 28, 0) 70%, var(--bg) 98%);
}
@media (max-width: 860px) { .hero-stage { display: none; } }

/* ---- The tour ----------------------------------------------------------------------------- */

.tour { max-width: var(--content); margin: 0 auto; padding: 2rem var(--gutter) 1rem; }
.tour-video {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid #2f3034; background: #101012;
}
.tour .aside { margin-top: 14px; }

/* ---- Feature cards carry their evidence --------------------------------------------------- */

/* Full-bleed across the top of the card: a screenshot with a margin around it reads as a
   picture OF the product, and one that reaches the edges reads as the product. */
.card .shot {
  display: block; width: calc(100% + 3.2rem); height: auto;
  margin: -1.6rem -1.6rem 1.1rem;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  /* A hairline under the shot, brighter than the card's own edge: it is the bottom of a screen,
     and a screenshot with no edge on a dark page is a hole in the card. */
  border-bottom: 1px solid #3f4049;
  background: #16161a;
}
/* The one claim with nothing to photograph — a gutter that failed — says so quietly instead. */
.card-note {
  background: linear-gradient(180deg, #232429, #1e1f23);
  border-style: dashed;
}

@media (max-width: 560px) {
  .nav-inner { gap: 1rem; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.9rem; }
}
