/* Frankly blog: shared paper-and-ink base for the post and listing templates.
   Scoped to .fk-blog (the page wrapper on both templates); Poppins and the
   --fk-* scales load via theme.css.

   Tokens live on the wrapper, NOT on :root, so the shared Nav and Footer
   inherit nothing from here. Accents map onto the existing theme.css scales
   (--fk-teal-*, --fk-red-*); only the warm paper-and-ink neutrals are named
   here, matching DESIGN.md.

   Contrast, measured (WCAG 2.x):
     --bp-body   on --bp-paper ... 8.19:1   body copy
     --bp-muted  on --bp-paper ... 5.43:1   dates, read time, labels
     --bp-muted  on --bp-sand  ... 4.64:1   labels in the next-step band
     teal-600    on --bp-paper ... 4.85:1   links
     teal-700    on --bp-sand  ... 7.03:1   links/ghost button on sand
                                            (teal-600 there is 4.15:1, fails)
     teal-700    on teal-50    ... 7.35:1   tags, note titles
     --bp-cream  on red-400    ... 4.55:1   demo button

   Shared pieces: tokens, focus and selection, topic tags, avatars, the
   Next-step offers (demo + Funding Guide), the action/ghost buttons, and the
   restyled HubSpot blog_subscribe form. */

.fk-blog {
  --bp-cream:  #f8f3ea;
  --bp-paper:  #fdfaf4;
  --bp-sand:   #efe8da;
  --bp-ink:    #17160f;
  --bp-body:   #514c42;
  --bp-muted:  #6a675e;
  --bp-hair:   #e3dcc9;
  --bp-hair-strong: #d2c8ad;

  --bp-pad: clamp(22px, 5vw, 72px);
  --bp-measure: 44rem;
  accent-color: var(--fk-teal-600);
  --bp-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  font-family: var(--font-brand);
  color: var(--bp-body);
  background: var(--bp-cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-block: clamp(20px, 4vw, 40px) clamp(64px, 9vw, 112px);
}

.fk-blog [hidden] { display: none !important; }

html:has(.fk-blog) { scrollbar-color: #d2c8ad #f8f3ea; }

.fk-blog ::selection {
  background: var(--fk-teal-100);
  color: var(--bp-ink);
}

.fk-blog :focus-visible {
  outline: 2px solid var(--fk-teal-600);
  outline-offset: 3px;
  border-radius: 4px;
}

.fk-blog .bp-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 13px;
  border: 1px solid var(--fk-teal-400);
  border-radius: var(--r-full);
  background: var(--fk-teal-50);
  color: var(--fk-teal-700);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 150ms var(--bp-ease), border-color 150ms var(--bp-ease);
}
@media (hover: hover) {
  .fk-blog .bp-tag:hover {
    background: var(--fk-teal-100);
    border-color: var(--fk-teal-600);
  }
}

.fk-blog .bp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--bp-paper);
  object-fit: cover;
  flex-shrink: 0;
}
.fk-blog .bp-avatar--lg { width: 56px; height: 56px; }
.fk-blog .bp-avatar--blank {
  display: inline-grid;
  place-items: end center;
  overflow: hidden;
  background: var(--bp-sand);
  color: var(--bp-hair-strong);
}
.fk-blog .bp-avatar--blank svg { width: 100%; height: 100%; }

.fk-blog .bp-tag--quiet {
  border-color: var(--bp-hair);
  background: var(--bp-paper);
  color: var(--bp-body);
}
@media (hover: hover) {
  .fk-blog .bp-tag--quiet:hover {
    border-color: var(--fk-teal-600);
    background: var(--fk-teal-50);
    color: var(--fk-teal-700);
  }
}

.fk-blog .bp-next__offers {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 32px 56px;
  align-items: start;
}
.fk-blog .bp-next__offers--single { grid-template-columns: minmax(0, 1fr); }
.fk-blog .bp-next__offers--single .bp-next__demo { max-width: 40rem; }

.fk-blog .bp-next__title {
  margin: 0;
  font-size: clamp(25px, 2.8vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--bp-ink);
  text-wrap: balance;
}
.fk-blog .bp-next__subtitle {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--bp-ink);
}
.fk-blog .bp-next__body {
  margin: 12px 0 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bp-body);
  max-width: 34em;
}
.fk-blog .bp-next__funding {
  padding-left: 56px;
  border-left: 1px solid var(--bp-hair-strong);
  margin-left: -56px;
  padding-top: 4px;
}

.fk-blog .btn.bp-btn-action {
  background: var(--fk-red-400);
  border-color: var(--fk-red-400);
  color: var(--bp-cream);
  font-size: 15px;
  padding: 13px 26px;
}
.fk-blog .btn.bp-btn-action:hover {
  background: var(--fk-red-500);
  border-color: var(--fk-red-500);
}
.fk-blog .btn.bp-btn-ghost {
  background: transparent;
  border-color: var(--fk-teal-700);
  color: var(--fk-teal-700);
}
.fk-blog .btn.bp-btn-ghost:hover {
  background: var(--fk-teal-700);
  color: var(--bp-cream);
}
.fk-blog .btn.bp-btn-action:focus-visible,
.fk-blog .btn.bp-btn-ghost:focus-visible { border-radius: var(--r-lg); }

.fk-blog .bp-subscribe__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--bp-ink);
}
.fk-blog .bp-subscribe__body {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--bp-body);
}
.fk-blog .bp-subscribe__form h3:empty { display: none; }
.fk-blog .bp-subscribe__form .hs-form,
.fk-blog .bp-subscribe__form form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.fk-blog .bp-subscribe__form .hs-form-field { flex: 1 1 220px; margin: 0; }
.fk-blog .bp-subscribe__form label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bp-muted);
}
.fk-blog .bp-subscribe__form input[type="email"],
.fk-blog .bp-subscribe__form input[type="text"],
.fk-blog .bp-subscribe__form select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--bp-hair-strong);
  border-radius: var(--r-md);
  background: var(--bp-paper);
  font: 400 15px/1.3 var(--font-brand);
  color: var(--bp-ink);
  transition: border-color 150ms var(--bp-ease), box-shadow 150ms var(--bp-ease);
}
.fk-blog .bp-subscribe__form input:focus,
.fk-blog .bp-subscribe__form select:focus {
  outline: none;
  border-color: var(--fk-teal-600);
  box-shadow: 0 0 0 3px rgba(63, 120, 117, 0.16);
}
.fk-blog .bp-subscribe__form .inputs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}
.fk-blog .bp-subscribe__form .inputs-list label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 500;
  color: var(--bp-body);
}
.fk-blog .bp-subscribe__form .hs_submit,
.fk-blog .bp-subscribe__form .actions { margin: 0; }
.fk-blog .bp-subscribe__form input[type="submit"],
.fk-blog .bp-subscribe__form .hs-button {
  min-height: 46px;
  padding: 0 22px;
  border: 1.5px solid var(--fk-teal-600);
  border-radius: var(--r-lg);
  background: var(--fk-teal-600);
  font: 600 14.5px/1 var(--font-brand);
  color: var(--white);
  cursor: pointer;
  transition: background-color 150ms var(--bp-ease), border-color 150ms var(--bp-ease);
}
.fk-blog .bp-subscribe__form input[type="submit"]:hover,
.fk-blog .bp-subscribe__form .hs-button:hover {
  background: var(--fk-teal-700);
  border-color: var(--fk-teal-700);
}
.fk-blog .bp-subscribe__form .hs-error-msgs {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--error);
}
.fk-blog .bp-subscribe__form .submitted-message {
  font-size: 15px;
  font-weight: 600;
  color: var(--fk-green-600);
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 820px) {
  .fk-blog .bp-next__offers { grid-template-columns: minmax(0, 1fr); }
  .fk-blog .bp-next__funding {
    margin-left: 0;
    padding-left: 0;
    padding-top: 28px;
    border-left: 0;
    border-top: 1px solid var(--bp-hair-strong);
  }
}

@media (max-width: 520px) {
  .fk-blog .bp-next__offers .btn { width: 100%; justify-content: center; min-height: 52px; }
  .fk-blog .bp-subscribe__form input[type="submit"],
  .fk-blog .bp-subscribe__form .hs-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .fk-blog *,
  .fk-blog *::before,
  .fk-blog *::after {
    transition-duration: 0s !important;
  }
}
