/* css/fonts.css */
/* Self-hosted Google Fonts (variable woff2, latin + latin-ext), so no third-party request blocks

   the first paint. Inter and Plus Jakarta Sans: weights 400–700 in one file each. Kavoon: the

   home demo's font picker. Regenerate with the same families if a weight or font is added. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Kavoon';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/kavoon-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Kavoon';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/kavoon-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/plus-jakarta-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* css/components/page-loader.css */
/* Full-screen loader: three dots bouncing in a staggered wave while alternating between the
   two brand colours (green #90A733, blue-grey #8DAEB5). Shown until the first screen is ready
   (js/components/page-loader.js), then faded out. Only transform animates for the motion;
   the colour change is on three small dots. */
html.is-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #f4f4f4;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.page-loader__dots {
  --dot: 22px;
  --loader-duration: 2.4s;

  display: flex;
  align-items: center;
  gap: calc(var(--dot) * 0.8);
}

.page-loader__dots span {
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: #90a733;
  animation:
    loader-bounce calc(var(--loader-duration) / 3) cubic-bezier(0.45, 0, 0.55, 1) infinite,
    loader-colour var(--loader-duration) linear infinite;
}

/* Each dot trails the previous one, so both the wave and the colour change travel along. */
.page-loader__dots span:nth-child(2) {
  animation-delay: -0.66s, -2.2s;
}

.page-loader__dots span:nth-child(3) {
  animation-delay: -0.53s, -2s;
}

@keyframes loader-bounce {
  0%, 100% { transform: translateY(calc(var(--dot) * 0.7)); }
  50% { transform: translateY(calc(var(--dot) * -0.7)); }
}

/* Brand colours only: green #90A733 and blue-grey #8DAEB5, with quick (~80ms) switches. */
@keyframes loader-colour {
  0%, 45% { background: #90a733; }
  50%, 95% { background: #8daeb5; }
  100% { background: #90a733; }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader__dots span {
    animation: loader-colour var(--loader-duration) linear infinite;
  }
}

/* css/styles.css */
:root {
  --color-bg: #ffffff;
  --color-text: #12111d;
  --color-muted: #5b6470;
  --color-primary: #90a733;
  --color-primary-contrast: #ffffff;
  --color-border: #e5e7eb;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Titles: Plus Jakarta Sans (Google Fonts, loaded in each page's <head>). */
  --font-display: "Plus Jakarta Sans", var(--font-sans);
  /* Page side padding: 40px desktop, 32px tablet, 16px phone. Content is capped at 1320px. */
  --gutter: 40px;
  --container: calc(1320px + 2 * var(--gutter));
  --radius: 10px;
  --header-h: 80px;
  /* Height-fitted desktop sections never lay out shorter than this (keep in sync with
     MIN_HEIGHT in js/components/viewport-fit.js). */
  --fit-min-height: 600px;
}

@media (max-width: 1199px) {
  :root {
    --header-h: 64px;
    --gutter: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  /* Decorative glows sit partly off-screen; never let them cause horizontal scroll. */
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Green title accent (Figma: linear, #A0BF22 at 55% → #3C4A07 at 100%).
   box-decoration-break gives each line of a wrapped accent the full gradient. */
.text-gradient {
  background: linear-gradient(90deg, #a0bf22 55%, #3c4a07 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.btn-primary {
  --btn-bg: #90a733;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--btn-bg);
  /* Inner shadows cover the full shape, including under the stroke, like Figma.
     White glow listed first so it paints on top of the dark shadow. */
  box-shadow:
    inset 0 2px 8px -2px rgba(255, 255, 255, 0.56),
    inset 0 0 8px -2px rgba(0, 0, 0, 0.24);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}

/* Figma's inside gradient stroke: a 1px ring drawn on top of the fill and shadows. */
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.12));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-primary:active {
  filter: brightness(0.96);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--btn-bg);
  outline-offset: 2px;
}

/* css/components/reveal.css */
/* In-view reveal animations (js/components/reveal.js).
   - data-reveal="<variant>" on an element: it animates once, the first time it scrolls into
     view. Optional fixed delay: style="--reveal-delay: 120ms".
   - data-reveal-children="<variant>" on a list: each child gets that variant, and children
     revealed together are staggered automatically. Add data-reveal-together to reveal the
     whole list as soon as any child is in view (horizontal rows).
   The hidden start state only applies under html.js (inline script in <head>), so without JS
   everything is simply visible. Keyframe animations (not transitions) are used so a reveal
   never overrides an element's own hover / state transitions; when one ends, the element is
   back to its normal styles. Only opacity / transform / filter animate.

   Variants:
     blur     filter blur(20px)                → none   (headings, short text)
     up       translateY(100px)                → none   (large visuals)
     fade-up  opacity 0 + translateY(40px)     → none   (cards, paragraphs, rows) */
.js [data-reveal="blur"]:not(.is-revealed) {
  filter: blur(20px);
}

.js [data-reveal="up"]:not(.is-revealed) {
  transform: translateY(100px);
}

.js [data-reveal="fade-up"]:not(.is-revealed) {
  opacity: 0;
  transform: translateY(40px);
}

.js [data-reveal].is-revealed {
  animation-duration: 0.9s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-delay: var(--reveal-delay, 0s);
  animation-fill-mode: backwards;
}

.js [data-reveal="blur"].is-revealed {
  animation-name: reveal-blur;
}

.js [data-reveal="up"].is-revealed {
  animation-name: reveal-up;
}

.js [data-reveal="fade-up"].is-revealed {
  animation-name: reveal-fade-up;
}

@keyframes reveal-blur {
  from { filter: blur(20px); }
}

@keyframes reveal-up {
  from { transform: translateY(100px); }
}

@keyframes reveal-fade-up {
  from { opacity: 0; transform: translateY(40px); }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal]:not(.is-revealed) {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .js [data-reveal].is-revealed {
    animation: none;
  }
}

/* css/components/header.css */
/* The header is its own dark bar, whatever the top of the page looks like. On pages with a dark
   hero under it (<site-header transparent>), the bar only appears once scrolling starts. */
site-header {
  --color-text: #ffffff;
  --color-muted: #c4c4cc;
  --color-border: rgba(255, 255, 255, 0.08);

  display: block;
  color: var(--color-text);
  position: sticky;
  top: 0;
  z-index: 50;
  /* Reserve height before the component renders to avoid layout shift. */
  min-height: var(--header-h);
}

.site-header {
  background: rgba(18, 17, 29, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, backdrop-filter 0.2s ease, -webkit-backdrop-filter 0.2s ease;
}

.site-header--transparent:not(.is-scrolled, .is-open) {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.site-header__logo img {
  height: 38px;
  width: auto;
}

.site-header__menu {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  gap: 24px;
}

/* Centered on the page (not between logo and actions), as in the design. */
.site-header__nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 45px;
}

.site-header__link,
.site-header__demo {
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-header__link {
  color: var(--color-muted);
}

.site-header__link:hover,
.site-header__link[aria-current="page"] {
  color: var(--color-text);
}

.site-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header__demo {
  color: var(--color-text);
  font-weight: 500;
}

.site-header__demo:hover {
  color: var(--color-muted);
}

.site-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header__toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.is-open .site-header__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.is-open .site-header__toggle span:nth-child(2) {
  opacity: 0;
}

.is-open .site-header__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1199px) {
  .site-header__logo img {
    height: 34px;
  }

  .site-header__toggle {
    display: flex;
  }

  /* Drawer: always rendered so it can animate. Closed = clipped to nothing above its top
     edge + invisible (visibility also removes it from keyboard / screen readers once the
     close transition ends). Opening unrolls it downward, then the items rise in one by
     one (--i, set per item by site-header.js); closing is a quicker reverse. */
  .site-header__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 8px var(--gutter) 24px;
    /* Opaque, no backdrop-filter: nested inside the header's own backdrop-filter, a second
       one renders the page through the drawer in Chrome. */
    background: #12111d;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition:
      clip-path 0.3s cubic-bezier(0.4, 0, 1, 1),
      visibility 0s linear 0.3s;
  }

  .is-open .site-header__menu {
    clip-path: inset(0 0 -60px 0); /* negative bottom keeps the shadow visible */
    visibility: visible;
    transition:
      clip-path 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s;
  }

  .site-header__menu .site-header__link,
  .site-header__menu .site-header__demo,
  .site-header__menu .btn-primary {
    opacity: 0;
    transform: translateY(-10px);
    transition:
      opacity 0.15s ease,
      transform 0.15s ease;
  }

  .is-open .site-header__menu .site-header__link,
  .is-open .site-header__menu .site-header__demo,
  .is-open .site-header__menu .btn-primary {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.35s ease calc(0.12s + var(--i, 0) * 0.04s),
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) calc(0.12s + var(--i, 0) * 0.04s),
      color 0.15s ease;
  }

  .site-header__nav {
    position: static;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-header__link {
    padding-block: 12px;
    font-size: 16px;
  }

  .site-header__actions {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .site-header__demo {
    padding-block: 10px;
    text-align: center;
  }
}

@media (max-width: 1199px) and (prefers-reduced-motion: reduce) {
  .site-header__menu,
  .is-open .site-header__menu {
    clip-path: none;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  }

  .is-open .site-header__menu {
    opacity: 1;
    transition: opacity 0.2s ease, visibility 0s;
  }

  .site-header__menu .site-header__link,
  .site-header__menu .site-header__demo,
  .site-header__menu .btn-primary {
    transform: none;
  }
}

/* css/sections/blog-post.css */
/* Blog post page. Hero (breadcrumb, title, lead, byline | cover card), then a 2-column body:
   sticky contents box + share + ad (left) and the article (right). Article HTML comes from the backend later, so it is styled generically
   (.post-content) and the table of contents is built from its <h2>s
   (js/components/blog-post.js). */
/* Hero: a light brand band with the text on the left and the cover as a card on the right.
   Pulled up under the sticky header so the band starts at the top of the page. */
.post-hero {
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 56px) 0 64px;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(217, 243, 107, 0.22), transparent 70%),
    #f6f8ec;
}

.post-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
}

.post-hero--no-cover .post-hero__inner {
  grid-template-columns: minmax(0, 820px);
}

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  color: #5b6470;
  font-size: 13px;
  font-weight: 500;
}

.post-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.post-breadcrumb a:hover {
  color: var(--color-text);
}

.post-breadcrumb [aria-current] {
  color: #6f8a1f;
  overflow-wrap: anywhere;
}

.post-breadcrumb li + li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.post-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  word-spacing: 5px;
  letter-spacing: -0.5px;
  line-height: 1.4;
  text-wrap: balance;
}

.post-lead {
  margin: 0 0 28px;
  max-width: 560px;
  color: #5b6470;
  font-size: 17px;
  line-height: 28px;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-byline__avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #90a733, #8daeb5);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
}

.post-byline__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-byline__name {
  margin: 0 0 2px;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
}

.post-byline__meta {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.post-byline__meta > * + *::before {
  content: "·";
  margin: 0 8px;
}

.post-cover {
  margin: 0;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #ececec;
  box-shadow: 0 16px 36px -18px rgba(18, 17, 29, 0.16);
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body grid */
.post-body {
  padding-block: 80px calc(140px + var(--cta-overlap));
}

/* Blog pages use a narrower page width than the marketing pages (header and footer stay full). */
.blog-narrow {
  --container: calc(1140px + 2 * var(--gutter));
}

/* Left column, then the article right next to it (the article takes the rest of the row). */
.post-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: start;
  gap: 48px;
}

/* Desktop: the left column sticks and is at most one screen tall. Only the contents box
   scrolls (inside itself); the share buttons and the ad below it always show in full. */
@media (min-width: 900px) {
  .post-toc-side {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--header-h) - 48px);
    /* If the box (at its minimum height), share buttons and ad don't fit on a short screen, the
       column scrolls instead, so the ad is still reachable. The side padding, cancelled by the
       negative margin, keeps the ad's shadow from being clipped. */
    margin-inline: -16px;
    padding: 0 16px 24px;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .post-toc-side::-webkit-scrollbar {
    display: none;
  }

  .post-toc-side > .post-aside {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* The box: its title stays put; only the list below it scrolls. */
  .post-toc-side .post-toc-panel {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-height: 260px; /* title + about four headings */
    border-radius: 12px;
    background: #f5f5f6;
    overflow: hidden;
  }

  .post-toc-side .post-toc-panel__title {
    display: block;
    flex: none;
    margin: 0;
    padding: 16px 16px 10px;
    font-size: 14px;
    font-weight: 600;
  }

  .post-toc-side .post-toc-box {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 16px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .post-toc-side .post-toc {
    margin-bottom: 0;
  }

  .post-toc-side .post-side-ad {
    flex: none;
  }

  .post-toc-side .post-side-ad {
    margin-top: 20px;
  }
}

/* The contents box's own title is for desktop; phones use the collapsible <summary>. */
.post-toc-panel__title {
  display: none;
}

/* The copy after the article is for tablets / phones only. */
.post-side-ad--inline {
  display: none;
}

/* Table of contents */
.post-toc {
  margin: 0 0 24px;
  padding: 0;
  border-left: 1px solid #e6e6e6;
  list-style: none;
  font-size: 13px;
  line-height: 19px;
}

.post-toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  color: #5b6470;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.post-toc a:hover {
  color: var(--color-text);
}

.post-toc a[aria-current="true"] {
  border-left-color: #90a733;
  color: #7d9a2c;
}

/* "Share" and the four buttons on one line, at the end of the article (under the author). */
.post-share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

/* The header's copy: smaller, no fills, muted until hovered (the full row is under the article). */
.post-share-row--quiet {
  gap: 8px;
  margin-top: 16px;
}

.post-share-row--quiet .post-share__label {
  color: #8a8f80;
  font-size: 12px;
}

.post-share-row--quiet .post-share {
  gap: 2px;
}

.post-share-row--quiet .post-share a,
.post-share-row--quiet .post-share button {
  width: 28px;
  height: 28px;
  background: transparent;
  color: #8a8f80;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.post-share-row--quiet .post-share a:hover,
.post-share-row--quiet .post-share button:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #12111d;
}

.post-share-row--quiet .post-share svg {
  width: 13px;
  height: 13px;
}

/* The post's topics, as chips under the byline (each opens the blog filtered by it). */
.post-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

/* Small, quiet tags: a tinted brand dot, uppercase label, hairline border. */
.post-topics a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(111, 138, 31, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: #4b5a17;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 16px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.post-topics a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #90a733;
}

.post-topics a:hover {
  border-color: rgba(111, 138, 31, 0.45);
  background: #ffffff;
  color: #2f3a0d;
}

.post-share__label {
  margin: 0;
  color: #5b6470;
  font-size: 13px;
}

.post-share {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-share a,
.post-share button {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f0f0;
  color: #12111d;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.post-share a:hover,
.post-share button:hover {
  background: #e3e3e3;
}

.post-share svg {
  width: 14px;
  height: 14px;
}

/* "Copied" tooltip on the copy-link button. */
.post-share button::after {
  content: attr(data-copied);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  padding: 3px 8px;
  border-radius: 4px;
  background: #12111d;
  color: #ffffff;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.post-share button.is-copied::after {
  opacity: 1;
}

/* Article content (backend HTML) */
.post-content {
  color: #3a3a44;
  font-size: 15px;
  line-height: 26px;
  /* Long URLs / words wrap instead of widening the page. */
  overflow-wrap: break-word;
}

.post-content > :first-child {
  margin-top: 0;
}

/* Headings 1–6 from the editor, on a scale between the post title and the body text. */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  color: var(--color-text);
  font-family: var(--font-display);
  /* Lands below the sticky header when jumped to (the table of contents links the h2s). */
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.post-content h1 {
  margin: 56px 0 20px;
  font-size: 28px;
  font-weight: 600;
  line-height: 36px;
}

.post-content h2 {
  margin: 48px 0 20px;
  font-size: 22px;
  font-weight: 500;
  line-height: 30px;
}

.post-content h3 {
  margin: 32px 0 12px;
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
}

.post-content h4 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}

.post-content h5 {
  margin: 24px 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.post-content h6 {
  margin: 24px 0 8px;
  color: #5b6470;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-content p,
.post-content ul,
.post-content ol {
  margin: 0 0 20px;
}

.post-content ul,
.post-content ol {
  padding-left: 22px;
}

.post-content li + li {
  margin-top: 8px;
}

/* The editor saves each item as <li><p>…</p></li>: no paragraph gap inside a list item, so the
   list keeps its own 8px rhythm (a second paragraph or a nested list in an item stays close). */
.post-content li > p {
  margin: 0;
}

.post-content li > p + p,
.post-content li > ul,
.post-content li > ol {
  margin: 8px 0 0;
}

.post-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.post-content a {
  color: #2f6fde;
  text-underline-offset: 2px;
}

.post-content figure {
  margin: 32px 0;
}

.post-content img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.post-content figcaption {
  margin-top: 8px;
  color: #8a8a8a;
  font-size: 13px;
  text-align: center;
}

.post-content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid #90a733;
  color: var(--color-text);
  font-size: 17px;
}

/* Tables: wrapped in .post-table by BlogController, which scrolls sideways on narrow screens
   so a wide table never widens the page. */
.post-table {
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid #ececec;
  border-radius: 8px;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 22px;
}

.post-content th,
.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid #ececec;
  text-align: left;
  vertical-align: top;
}

.post-content th {
  background: #fafafa;
  color: var(--color-text);
  font-weight: 600;
}

.post-content tr:last-child > td {
  border-bottom: 0;
}

/* The editor puts a <p> in every cell. */
.post-content th p,
.post-content td p {
  margin: 0;
}

.post-content pre {
  position: relative;
  margin: 0 0 20px;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 8px;
  background: #f5f5f7;
  font-size: 13px;
  line-height: 20px;
}

.post-content pre.has-copy {
  padding-right: 76px;
}

.post-content pre code {
  white-space: pre-wrap;
  word-break: break-word;
}

.post-content :not(pre) > code {
  padding: 1px 6px;
  border-radius: 4px;
  background: #f0f0f3;
  font-size: 0.92em;
}

.post-content .code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border: 1px solid #d9d9df;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font: 600 12px/16px inherit;
  font-family: inherit;
  cursor: pointer;
}

.post-content .code-copy:hover {
  border-color: #90a733;
  color: #4f6a00;
}

.post-content .code-copy.is-copied {
  border-color: #90a733;
  background: #90a733;
  color: #fff;
}

.post-content iframe,
.post-content video {
  max-width: 100%;
}

/* Author */
.post-author {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  margin-top: 56px;
  padding: 24px;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fafafa;
}

.post-author__avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #90a733, #8daeb5);
  color: #ffffff;
  font-weight: 600;
  overflow: hidden;
}

.post-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
}

.post-author__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
}

.post-author__bio {
  margin: 0;
  color: #5b6470;
  font-size: 13px;
  line-height: 20px;
}

/* The icon buttons have padding around the glyph: pull them left so the first icon lines up
   with the name and bio above it. */
.post-author__links {
  margin: 2px 0 0 -6px;
}

.post-author .post-share a {
  width: 28px;
  height: 28px;
  background: transparent;
}

.post-author .post-share a:hover {
  background: #ececec;
}

/* Ad */
.post-ad {
  display: block;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(18, 17, 29, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-ad:hover {
  box-shadow: 0 12px 36px rgba(18, 17, 29, 0.1);
  transform: translateY(-2px);
}

.post-ad img {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.post-ad:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Narrow desktops: a slimmer left column. */
@media (max-width: 1239px) {
  .post-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
  }
}

/* Tablet / phone: one column; the contents list becomes a collapsible box above the article. */
@media (max-width: 899px) {
  .post-hero {
    padding: calc(var(--header-h) + 40px) 0 40px;
  }

  /* Stacked: text first, then the cover. */
  .post-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .post-title {
    font-size: 32px;
  }

  .post-lead {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 26px;
  }

  .post-cover {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
  }

  .post-body {
    padding-block: 40px calc(88px + var(--cta-overlap));
  }

  .post-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .post-toc-side {
    position: static;
  }

  /* The left column is above the article here: show the ad after the article instead. */
  .post-toc-side .post-side-ad {
    display: none;
  }

  .post-side-ad--inline {
    display: block;
    max-width: 360px;
    margin-top: 40px;
  }

  .post-toc-box {
    padding: 16px 20px;
    border: 1px solid #ececec;
    border-radius: 10px;
  }

  .post-toc-box > summary {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }

  .post-toc-box[open] > summary {
    margin-bottom: 12px;
  }
}

@media (min-width: 900px) {
  /* Desktop: the contents list is always open (summary hidden). */
  .post-toc-box > summary {
    display: none;
  }
}

@media (max-width: 640px) {
  .post-title {
    font-size: 27px;
  }


  .post-content {
    font-size: 15px;
  }

  .post-content h1 {
    font-size: 24px;
    line-height: 32px;
  }

  .post-content h2 {
    font-size: 20px;
    line-height: 28px;
  }
}

/* Admin preview of a draft / scheduled post. */
.post-draft-note {
  display: inline-block;
  margin: 0 0 20px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #fff4d6;
  color: #7a5a00;
  font-size: 13px;
}

/* css/sections/footer.css */
/* Footer: green CTA banner overlapping the section above, then the dark link footer. */
:root {
  --cta-overlap: 220px;
}

@media (max-width: 640px) {
  :root {
    --cta-overlap: 140px;
  }
}

.site-footer {
  --color-text: #ffffff;
  --color-muted: #c4c4cc;

  /* flow-root stops the CTA's negative margin collapsing through the footer. */
  display: flow-root;
  padding-bottom: 40px;
  background: #120d21;
  color: var(--color-text);
}

/* CTA banner: pulled up so it straddles the white section and the dark footer. */
.footer-cta {
  position: relative;
  isolation: isolate;
  margin-top: calc(-1 * var(--cta-overlap));
  padding: 50px 32px 66px;
  border-radius: 16px;
  background:
    radial-gradient(45% 80% at 8% 60%, rgba(78, 102, 20, 0.55), transparent 70%),
    radial-gradient(40% 70% at 95% 20%, rgba(96, 124, 24, 0.5), transparent 70%),
    linear-gradient(90deg, #7e9c32, #86a53c 50%, #7a972f);
  overflow: hidden;
  text-align: center;
}

.footer-cta__title {
  margin: 0 auto 10px;
  max-width: 620px;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  line-height: 56px;
}

.footer-cta__text {
  margin: 0 auto 32px;
  max-width: 600px;
  color: #ffffff;
  font-size: 16px;
  line-height: 24px;
}

.footer-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.footer-cta__trial {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  color: #12111d;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.footer-cta__trial:hover {
  background: #eef2e0;
}

.footer-cta__demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.footer-cta__demo svg {
  width: 18px;
  height: 18px;
  transition: transform 0.15s ease;
}

.footer-cta__demo:hover svg {
  transform: translate(2px, -2px);
}

/* Link columns */
.footer-main {
  display: grid;
  /* Figma at 1320px: brand 433, link columns 117 / 117 / 172, subscribe 321 (40px gaps). */
  grid-template-columns: minmax(0, 433fr) minmax(0, 117fr) minmax(0, 117fr) minmax(0, 172fr) minmax(0, 321fr);
  gap: 40px;
  padding-block: 88px 40px;
}

.footer-brand img {
  width: auto;
  height: 43px;
  margin-bottom: 24px;
}

.footer-brand p {
  margin: 0 0 24px;
  max-width: 360px;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 24px;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #262235;
  color: #ffffff;
  transition: background-color 0.15s ease;
}

.footer-social a:hover {
  background: #3a3550;
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.footer-nav h2,
.footer-subscribe h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Rows exactly 20px tall (Figma: 36px between links), not the body's 1.6 line-height. */
.footer-nav li {
  font-size: 14px;
  line-height: 20px;
}

.footer-nav a {
  color: var(--color-muted);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-subscribe p {
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 24px;
}

.footer-subscribe__form {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #1c1829;
}

.footer-subscribe__form input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
}

.footer-subscribe__form input::placeholder {
  color: #9a98a6;
}

.footer-subscribe__form input:focus {
  outline: none;
}

.footer-subscribe__form:focus-within {
  border-color: #90a733;
}

.footer-subscribe__form button {
  flex: none;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 7px;
  background: #90a733;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.footer-subscribe__form button:hover {
  filter: brightness(1.06);
}

.footer-subscribe__form button:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* Shown under the form without taking up layout space (keeps Figma's 40px above the divider).
   Always the last (wide) column: the "More pages" column is only rendered once its links are set. */
.footer-subscribe {
  position: relative;
  grid-column: 5;
}

.footer-subscribe__status {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 8px 0 0;
  color: #c9dd7a;
  font-size: 13px;
}

.footer-subscribe__status.is-error {
  color: #ff9b9b;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-muted);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 20px;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 1099px) {
  .footer-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 48px;
  }

  .footer-brand,
  .footer-subscribe {
    grid-column: 1 / -1;
  }

  .footer-subscribe {
    max-width: 480px;
  }
}

@media (max-width: 640px) {
  .footer-cta {
    padding: 48px 20px;
  }

  .footer-cta__title {
    font-size: 28px;
    line-height: 36px;
  }

  .footer-cta__text {
    margin-bottom: 28px;
    font-size: 15px;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
    padding-block: 64px 40px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
