@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500&display=swap');

:root {
  color-scheme: light;
  font-family: "Lexend", "Helvetica Neue", sans-serif;
  --top-nav-offset: 18px;
  --top-nav-height: 54px;
  --color-accent: #b9c8a4;
  --color-on-accent: #1e2b1e;
  --color-app-bar: #101114;
  --color-text: #141414;
  --color-muted: #3f3f3f;
  --color-surface: #ffffff;
  --color-page: #f5f4f1;
  --color-border: #e3e3e3;
  --shadow-floating: 0 18px 45px rgba(16, 17, 20, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: calc(var(--top-nav-offset) + var(--top-nav-height));
  background: var(--color-page);
  color: var(--color-text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
}

html.topic-embed-scroll-lock,
body.topic-embed-scroll-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

a {
  color: inherit;
  text-decoration: none;
}

main.content a {
  color: #0b57d0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

main.content a:hover,
main.content a:focus-visible {
  text-decoration-thickness: 2px;
}

.top-nav {
  position: fixed;
  top: var(--top-nav-offset);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: min(calc(100% - 64px), 980px);
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  color: #202620;
  box-shadow: 0 20px 46px rgba(16, 17, 20, 0.08);
  backdrop-filter: blur(24px);
  overflow: hidden;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, backdrop-filter 180ms ease;
}

.nav-inner {
  max-width: none;
  margin: 0 auto;
  min-height: 52px;
  padding: 0 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  letter-spacing: -0.01em;
  color: #202620;
}

.brand-logo-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background-image: url("assets/bonsai-logo-28.png");
  background-image: image-set(
    url("assets/bonsai-logo-28.png") 1x,
    url("assets/bonsai-logo-56.png") 2x
  );
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  flex: 0 0 auto;
}

.marketing-nav-logo {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.brand-home {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 52px;
  padding-right: 18px;
  color: inherit;
  text-decoration: none;
}

body[data-topic-id] .brand-home {
  padding-right: 0;
}

.brand-home:hover,
.brand-home:focus-visible {
  text-decoration: none;
}

.brand-all-articles {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-left: 12px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  background: rgba(255, 255, 255, 0.66);
  color: #202620;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-decoration: none;
}

body[data-topic-id] .brand-all-articles {
  margin-left: 0;
}

.brand-all-articles:hover,
.brand-all-articles:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.brand-all-articles:focus-visible {
  outline: 2px solid rgba(16, 17, 20, 0.65);
  outline-offset: 3px;
}

.brand-title {
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.brand-tagline {
  display: none;
}

.marketing-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.marketing-nav-button,
.marketing-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.marketing-nav-button {
  background: rgba(255, 255, 255, 0.66);
  color: #202620;
}

.marketing-nav-button:hover,
.marketing-nav-button:focus-visible {
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.marketing-nav-button:focus-visible,
.marketing-secondary-button:focus-visible {
  outline: 2px solid rgba(16, 17, 20, 0.65);
  outline-offset: 3px;
}

.marketing-secondary-button {
  background: rgba(255, 255, 255, 0.52);
  color: #202620;
}

.marketing-secondary-button:hover,
.marketing-secondary-button:focus-visible {
  background: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

main.content a.marketing-secondary-button {
  color: #202620;
  text-decoration: none;
}

main.content a.marketing-secondary-button:hover,
main.content a.marketing-secondary-button:focus-visible {
  text-decoration: none;
}

.topics-dropdown {
  position: relative;
  /* Temporarily disabled to prevent horizontal scrolling. */
  display: none;
}

.nav-button {
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: #202620;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.9);
}

.nav-button:focus-visible {
  outline: 2px solid rgba(16, 17, 20, 0.65);
  outline-offset: 3px;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 10;
  min-width: 240px;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-floating);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.dropdown-panel::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.topics-dropdown:hover .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.category-item {
  position: relative;
  padding: 8px 12px;
  border-radius: 12px;
}

.category-item:hover {
  background: rgba(185, 200, 164, 0.2);
}

.category-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  z-index: 10;
  min-width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-floating);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.topic-list::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 8px;
  height: 100%;
}

.category-item:hover .topic-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.topic-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text);
}

.topic-list a:hover,
.topic-list a:focus-visible {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.topic-list a.is-active {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px 72px;
}

.content h2 {
  margin: 0 0 24px 0;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.marketing-landing-page {
  background:
    linear-gradient(180deg, #b7caa4 0%, #dfe9d3 18%, #f6f8f2 42%, #ffffff 78%);
  background-attachment: fixed;
}

.landing-content {
  max-width: 1240px;
  min-height: calc(100vh - 76px);
  padding-top: 56px;
  padding-bottom: 88px;
}

.landing-hero {
  display: grid;
  gap: 44px;
  justify-items: center;
}

.landing-hero-copy {
  width: 100%;
  display: flex;
  justify-content: center;
}

.landing-hero-heading {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(100%, 920px);
  gap: 0.18em;
  text-align: left;
  font-size: clamp(52px, 9vw, 92px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.landing-hero-line,
.landing-hero-cta,
.landing-hero-static,
.landing-hero-phrase {
  display: block;
}

.landing-hero-line-button {
  margin-left: -0.06em;
  margin-bottom: -0.18em;
  padding-left: 0;
}

.landing-hero-line-primary,
.landing-hero-line-secondary {
  padding-left: 0.12em;
}

.landing-hero-line-secondary {
  margin-top: 0;
}

.landing-hero-cta {
  min-width: 4.05em;
  padding: 0.14em 0.38em 0.18em 0.22em;
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 999px;
  background: #c7d4b6;
  color: #2b3427;
  line-height: 1.02;
  box-shadow: 0 18px 44px rgba(31, 47, 31, 0.12);
  text-decoration: none;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

main.content a.landing-hero-cta {
  color: #2b3427;
  text-decoration: none;
}

.landing-hero-cta:hover,
.landing-hero-cta:focus-visible {
  background: #d5e1c6;
  color: #2b3427;
  box-shadow: 0 24px 52px rgba(31, 47, 31, 0.18);
  text-decoration: none;
}

main.content a.landing-hero-cta:hover,
main.content a.landing-hero-cta:focus-visible {
  color: #2b3427;
  text-decoration: none;
}

.landing-hero-static {
  color: rgba(20, 20, 20, 0.82);
  line-height: 1.02;
}

.landing-hero-phrase {
  min-height: 1.14em;
  color: #2f5b34;
}

.landing-hero-phrase-stack {
  position: relative;
  display: inline-grid;
  min-height: 1.14em;
  overflow: hidden;
  padding-right: 0.08em;
  margin-right: -0.08em;
  line-height: 1.02;
}

.landing-hero-phrase-slot {
  grid-area: 1 / 1;
  min-height: 1.14em;
  color: #2f5b34;
  line-height: 1.02;
  will-change: transform, opacity;
}

.landing-hero-phrase-slot-next {
  opacity: 0;
  transform: translateY(-0.42em);
}

.landing-hero-phrase-stack.is-animating .landing-hero-phrase-slot-current {
  animation: landing-phrase-exit 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.landing-hero-phrase-stack.is-animating .landing-hero-phrase-slot-next {
  animation: landing-phrase-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes landing-phrase-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(0.42em);
  }
}

@keyframes landing-phrase-enter {
  from {
    opacity: 0;
    transform: translateY(-0.42em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-demo-frame {
  width: min(100%, 1000px);
  margin: 0;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(20, 20, 20, 0.1);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 68px rgba(16, 17, 20, 0.12);
  backdrop-filter: blur(10px);
}

.landing-demo-video {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 800;
  border-radius: 24px;
  border: 1px solid rgba(20, 20, 20, 0.08);
  background: #eef2e6;
  object-fit: contain;
}

.content h3 {
  margin: 32px 0 12px 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.content p {
  margin: 0 0 20px 0;
  color: var(--color-text);
}

.content ul {
  margin: 0 0 20px 0;
  padding-left: 1.25rem;
}

.content li {
  margin-bottom: 10px;
}

.content li:last-child {
  margin-bottom: 0;
}

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

.content .legal-markdown h1 {
  margin: 0 0 24px 0;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.content .legal-markdown h2,
.content .legal-markdown h3,
.content .legal-markdown h4,
.content .legal-markdown h5,
.content .legal-markdown h6 {
  margin: 32px 0 12px 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (max-width: 900px) {
  .landing-content {
    padding-top: 48px;
  }

  .landing-hero {
    gap: 36px;
  }

  .landing-hero-heading {
    width: min(100%, 760px);
  }

  .landing-demo-frame {
    padding: 12px;
    border-radius: 28px;
  }
}

@media (max-width: 560px) {
  :root {
    --top-nav-offset: 12px;
    --top-nav-height: 46px;
  }

  .top-nav {
    width: min(calc(100% - 40px), 980px);
  }

  .nav-inner {
    min-height: 44px;
    padding: 0 10px 0 0;
    gap: 10px;
  }

  .brand-block {
    gap: 0;
  }

  .brand-home {
    gap: 10px;
    min-height: 44px;
    padding-right: 14px;
  }

  .brand-logo-placeholder,
  .marketing-nav-logo {
    width: 44px;
    height: 44px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-all-articles,
  .marketing-nav-button,
  .marketing-secondary-button,
  .nav-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
  }

  .brand-all-articles {
    margin-left: 10px;
  }

  body[data-topic-id] .top-nav {
    width: min(calc(100% - 20px), 980px);
  }

  body[data-topic-id] .brand-title {
    font-size: 14px;
  }

  body[data-topic-id] .marketing-nav-actions {
    gap: 6px;
  }

  body[data-topic-id] .brand-all-articles,
  body[data-topic-id] .marketing-nav-button {
    max-width: 88px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .landing-content {
    min-height: auto;
    padding: 34px 20px 64px;
  }

  .landing-hero {
    gap: 28px;
  }

  .landing-hero-heading {
    gap: 0.18em;
    font-size: clamp(42px, 15vw, 60px);
    letter-spacing: -0.05em;
  }

  .landing-hero-line-primary,
  .landing-hero-line-secondary {
    padding-left: 0.04em;
  }

  .landing-hero-line-button {
    margin-bottom: -0.14em;
  }

  .landing-hero-cta {
    min-width: 0;
    padding-right: 0.3em;
    padding-left: 0.18em;
  }

  .landing-demo-frame {
    margin-top: 4px;
    padding: 10px;
    border-radius: 22px;
  }

  .landing-demo-video {
    border-radius: 16px;
  }
}

.topic-embed-shell {
  position: relative;
  width: 100%;
  padding-top: 75%;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  overflow: hidden;
}

.topic-embed {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.topic-figure {
  width: 66%;
  max-width: 720px;
  margin: 1.75rem auto;
}

@media (max-width: 560px) {
  .topic-figure {
    width: 100%;
    max-width: 100%;
  }
}

.topic-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.topic-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.topic-figure-caption {
  display: block;
}

.topic-figure-attrib {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9em;
}
