/* The handful of things Bulma does not give us.
 *
 * Lifted deliberately from hisn.io's own `styles.css` rather than invented, so
 * the two sites read as one family: the gradient, its angle and its stops are
 * the same values hisn.io uses on its own hero. */

.navbar.gradient-dark {
  transition: 0.4s ease;
  background-color: rgba(255, 255, 255, 0);
}

/* Bulma's `has-navbar-fixed-top` pads the body to clear a fixed navbar, which
 * leaves a white band above a transparent one. hisn.io's own home page solves
 * this by moving that padding off the body and into the hero, so the gradient
 * runs all the way up behind the navbar; the same fix, applied through a body
 * class rather than a per-page <style> block. */
body.hero-page.has-navbar-fixed-top {
  padding-top: 0;
}

body.hero-page section.home {
  padding-top: 3.25rem;
}

/* Over the hero, every navbar control is on the gradient and has to be legible
 * against it. Bulma colours navbar items for a light bar by default. */
.navbar.gradient-dark .navbar-item,
.navbar.gradient-dark .navbar-link {
  color: #fff;
}

/* Scoped to the links, not every navbar item: the brand is a logo, and
 * hovering a logo should not light up a block the width of the wordmark. */
.navbar.gradient-dark .navbar-end .navbar-item:hover,
.navbar.gradient-dark .navbar-end .navbar-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* The burger's three bars are near-black by default, invisible on the
 * gradient. */
.navbar.gradient-dark .navbar-burger span {
  background-color: #fff;
}

/* An open burger menu drops a panel below the navbar. On the hero that panel
 * needs a real background, or the links sit on the gradient at a width that
 * does not match them. */
.navbar.gradient-dark .navbar-menu.is-active {
  background-color: #0b5a8f;
}

section.section.gradient-dark {
  transition: 0.4s ease;
  background: #073554;
  background: linear-gradient(145deg, #1080cb 0%, #073554 125%);
  /* hisn.io uses 80vh, but its hero carries a tabbed install panel that fills
   * the height. This one is a headline and a code sample, and 80vh left a
   * band of empty gradient under them. Sized to the content instead.
   *
   * Deliberately not a flex container. Centring this with flex made the whole
   * page scroll sideways on a phone: a flex item defaults to `min-width:
   * auto`, so the container refused to shrink below the intrinsic width of the
   * `pre` inside it, and the headline ran off the screen. Padding does the
   * same job with no such trap. */
  min-height: 34rem;
}

.gradient-dark {
  transition: 0.4s ease;
  color: #fff;
}

/* The hero headline wants a little more air between lines than Bulma's
 * default, which is set for body copy rather than 3rem type. */
.line-height {
  line-height: 1.15;
}

/* Code samples on the gradient. A plain Bulma `box` is white, which is right
 * on a white page and far too loud against the hero. */
.code-sample {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  /* Scrolls itself on a narrow screen. `min-width: 0` is what actually allows
   * that: without it the block reports its full intrinsic width to whatever
   * lays it out, and the page scrolls sideways instead of the code. */
  overflow-x: auto;
  min-width: 0;
  max-width: 100%;
}

.code-sample pre {
  background: transparent;
  color: #e9f3fb;
  padding: 0;
  font-size: 0.86rem;
  line-height: 1.6;
}

.code-sample .c-key {
  color: #7fd3ff;
}

.code-sample .c-str {
  color: #a9e6b0;
}

.code-sample .c-com {
  color: #9bb2c4;
}

/* Claim cards. The border-left is the only decoration on them: it ties a card
 * to the brand without another block of colour competing with the hero. */
.claim {
  border-left: 3px solid #1080cb;
  padding: 0.25rem 0 0.25rem 1.25rem;
  height: 100%;
}

/* Bulma only spaces paragraphs inside `.content`, and these cards are not
 * that. Without this, two paragraphs in a claim read as one run-on block. */
.claim p + p {
  margin-top: 0.75rem;
}

.claim .claim-basis {
  color: #5a6b7a;
  font-size: 0.85rem;
  border-top: 1px solid #e4e9ee;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
}

/* The comparison table. Bulma's striped table is fine but the column that
 * matters should be obvious without reading the header. */
.compare td:last-child {
  background: #f2f8fd;
  font-weight: 600;
}

.compare th:last-child {
  background: #e4f1fb;
}

/* Footer legal block: quieter than body copy, still readable. */
.legal {
  color: #5a6b7a;
  font-size: 0.85rem;
  line-height: 1.7;
}

/* Inline code on the gradient. Bulma styles `code` pink-on-grey for a white
 * page, which is unreadable here. */
.gradient-dark code {
  background-color: rgba(0, 0, 0, 0.28);
  color: #e9f3fb;
}

/* Anchor offset, so a fixed navbar does not sit on top of a heading someone
 * has just jumped to. */
:target {
  scroll-margin-top: 5rem;
}

/* Reading measure.
 *
 * Bulma's container is as wide as the viewport allows, which is right for a
 * grid of cards and wrong for a paragraph: on a 1440px screen a full-width
 * line runs past 200 characters, and the eye loses its place returning to the
 * left margin. Prose sections opt into a measure instead. Cards and tables are
 * untouched, because those want the width. */
/* Centred, not left-hugging: a measure pinned to the left of a 1440px screen
 * leaves half the page empty and reads as a layout that broke rather than one
 * that chose. */
/* The `:not()` is not decoration. Bulma sets the container's width inside a
 * media query as `.container:not(.is-max-desktop):not(.is-max-widescreen)`,
 * which is three classes of specificity; a bare `.prose` is one and loses
 * silently, leaving the text full width with no sign of why. Matching the
 * specificity and loading after Bulma is what makes this apply. */
.container.prose:not(.is-max-desktop) {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* --- blog posts ---------------------------------------------------------- */

/* The measure is set inline on the container (46rem, roughly 65ch at this
 * size); everything here is rhythm. Bulma's `.content` is not used because
 * its list and heading rules fight long-form prose. */
.post-body p {
  margin-bottom: 1.1rem;
  line-height: 1.65;
}
.post-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.2rem 0 0.9rem;
  letter-spacing: -0.3px;
}
.post-body pre {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
}
.post-body code {
  background: #f6f8fa;
  color: #333;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.post-body pre code {
  padding: 0;
  background: none;
}
.post-body table {
  margin-bottom: 1.1rem;
  width: 100%;
}
.post-body table td, .post-body table th {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #e8e8e8;
  text-align: left;
}
.post-body ul, .post-body ol {
  margin: 0 0 1.1rem 1.4rem;
  /* Bulma resets list markers globally; long-form prose wants them back. */
  list-style: disc outside;
}
.post-body ol {
  list-style: decimal outside;
}
.post-body li {
  margin-bottom: 0.35rem;
  line-height: 1.6;
}
.post-body blockquote {
  border-left: 3px solid #1080cb;
  padding: 0.2rem 0 0.2rem 1.1rem;
  color: #555;
  margin-bottom: 1.1rem;
}


/* --- Utilities replacing inline style attributes -----------------------
   These were `style="..."` on the elements themselves until the site got a
   Content-Security-Policy. `style-src 'self'` blocks inline style attributes
   as well as <style> blocks, and the alternative -- allowing
   `unsafe-inline` for styles -- would put a hole in the one header a
   security reader looks at first. Six declarations were not worth that. */

.logo-mark      { height: 34px; }
.logo-mark-sm   { height: 30px; }
/* ~65 characters of running text, the measure the blog is set to. */
.measure        { max-width: 46rem; }
.measure-wide   { max-width: 920px; }
.title-tight    { letter-spacing: -0.5px; }
.demo-video     { width: 100%; border-radius: 8px; box-shadow: 0 4px 24px rgba(7, 53, 84, 0.18); }
