/* ==========================================================================
   "brief" layout
   Loaded only on the pages that opt in (see partials/head.html): the home page
   and the taxonomy term lists. Everything is prefixed `bh-` and scoped to
   markup those layouts add, so the shared partials keep their own styling.
   ========================================================================== */

:root {
  --bh-brand: #0e63f3;
  --bh-brand-hover: #0b50c9;

  --bh-ink: #262626;
  --bh-ink-tone: #4d4d4d;
  --bh-ink-content: #404040;
  --bh-ink-muted: #6f6f6f;

  --bh-bg: #fdfdfc;
  --bh-bg-tone: #f9f8f6;
  --bh-surface: #ffffff;
  --bh-border: #ebe8e0;

  --bh-radius: 8px;
  --bh-radius-lg: 12px;
  --bh-radius-xl: 16px;
  --bh-radius-pill: 30px;

  --bh-container: 1120px;
  --bh-gutter: 20px;
}

body { background-color: var(--bh-bg); }

.bh-home,
.bh-page {
  background-color: var(--bh-bg);
  color: var(--bh-ink);
  padding-bottom: 56px;
}

/* The theme's global `* { font-family: Inter }` matches every element
   directly, so inheriting from the wrapper is not enough to override it. */
.bh-home,
.bh-home *,
.bh-page,
.bh-page * {
  font-family: "Geist", "Inter", system-ui, -apple-system, sans-serif;
}

.bh-container {
  max-width: var(--bh-container);
  margin: 0 auto;
  padding: 0 var(--bh-gutter);
}

.bh-accent { color: var(--bh-brand); }

/* --------------------------------------------------------------------------
   Shared header / footer partials, aligned to the home container.
   These only neutralise Bootstrap's row + column gutters inside the wrappers
   this page adds; header.html and footer.html themselves are untouched, so
   every other page keeps its existing chrome.
   -------------------------------------------------------------------------- */

.bh-topbar .row,
.bh-sitefooter .row {
  margin-left: 0;
  margin-right: 0;
}

.bh-topbar [class*="col-"],
.bh-sitefooter [class*="col-"] {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.bh-sitefooter .page_container {
  max-width: var(--bh-container);
  padding: 0 var(--bh-gutter);
}

.bh-sitefooter .container-fluid { padding-left: 0; padding-right: 0; }

/* --------------------------------------------------------------------------
   Buttons and forms
   -------------------------------------------------------------------------- */

.bh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--bh-radius-pill);
  background-color: var(--bh-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 13px 26px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .18s ease;
}

.bh-btn:hover,
.bh-btn:focus-visible { background-color: var(--bh-brand-hover); color: #fff; }

.bh-btn--ghost {
  background-color: transparent;
  color: var(--bh-ink);
  box-shadow: inset 0 0 0 1px var(--bh-border);
}

.bh-btn--ghost:hover,
.bh-btn--ghost:focus-visible {
  background-color: var(--bh-surface);
  color: var(--bh-ink);
  box-shadow: inset 0 0 0 1px #d9d5c9;
}

.bh-btn--block { width: 100%; }

.bh-btn svg { width: 14px; height: 14px; flex: none; }

/* Inline pill: input and button share one rounded shell */
.bh-form--inline .bh-form__row {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 445px;
  padding: 5px;
  background-color: var(--bh-surface);
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius-pill);
}

.bh-form--inline .bh-form__input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 0;
  background: transparent;
  padding: 0 8px 0 18px;
  font-size: 15px;
  color: var(--bh-ink);
  outline: none;
}

/* Stacked: input above a full-width button */
.bh-form--stacked .bh-form__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bh-form--stacked .bh-form__input {
  width: 100%;
  border: 1px solid var(--bh-border);
  border-radius: var(--bh-radius-pill);
  background-color: var(--bh-surface);
  padding: 13px 20px;
  font-size: 15px;
  color: var(--bh-ink);
  outline: none;
}

.bh-form--stacked .bh-form__input:focus { border-color: #cfcabb; }

.bh-form__input::placeholder { color: #9a968c; }

.bh-home .bh-form .bh-form__note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--bh-ink-muted);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.bh-hero { padding: 40px 0 0; }

.bh-hero .bh-container { position: relative; }

/* Hand-drawn cue pointing from the headline down at the subscribe form. */
.bh-hero__arrow {
  position: absolute;
  right: 24px;
  top: 76px;
  width: 88px;
  height: auto;
  color: var(--bh-brand);
  pointer-events: none;
  z-index: 1;
}

.bh-hero__title {
  margin: 0 0 56px;
  font-size: clamp(2.4rem, 5.6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--bh-ink);
}

.bh-hero__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
  padding: 56px;
  background-color: var(--bh-bg-tone);
  border-radius: var(--bh-radius-xl);
}

.bh-hero__body { max-width: 34rem; }

.bh-hero__body p {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--bh-ink-content);
}

.bh-hero__subhead {
  margin: 32px 0 8px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--bh-ink);
}

.bh-hero__form { margin-top: 24px; }

.bh-hero__media { display: flex; justify-content: center; }

/* Phone mockup: a real mobile screenshot of a post inside a CSS bezel. Built in
   CSS rather than baked into an image so the status bar tracks --bh-brand and
   the frame stays sharp at any size. Proportions follow a real handset
   (~0.5 width:height) rather than the screenshot's own aspect. */
.bh-phone {
  position: relative;
  width: 228px;
  max-width: 100%;
  padding: 2px;                       /* the metal band itself */
  /* brushed-metal band: light along the top-left and bottom-right, darker on
     the perpendicular edges, which is what reads as a rounded metal rail */
  background: linear-gradient(145deg,
              #fafafb 0%, #c6c6cd 20%, #f0f0f3 44%,
              #b4b4bd 70%, #eeeef1 88%, #d2d2d9 100%);
  border-radius: 40px;
  box-shadow: 0 0 0 0.5px rgba(120, 120, 130, 0.45),
              0 26px 56px -24px rgba(17, 24, 39, 0.5),
              0 3px 8px rgba(17, 24, 39, 0.14);
}

/* black bezel between the metal band and the glass */
.bh-phone__body {
  padding: 6px;
  background: #08080a;
  border-radius: 38px;
}

/* volume / mute / power rails on the outside of the band */
.bh-phone__side {
  position: absolute;
  background: linear-gradient(180deg, #d7d7dd, #b0b0b8);
  border-radius: 1px;
}

.bh-phone__side--mute  { left: -1.5px; top: 84px;  width: 2px; height: 16px; border-radius: 2px 0 0 2px; }
.bh-phone__side--up    { left: -2px;   top: 112px; width: 2.5px; height: 30px; border-radius: 2px 0 0 2px; }
.bh-phone__side--down  { left: -2px;   top: 150px; width: 2.5px; height: 30px; border-radius: 2px 0 0 2px; }
.bh-phone__side--power { right: -2px;  top: 130px; width: 2.5px; height: 46px; border-radius: 0 2px 2px 0; }

.bh-phone__screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bh-surface);
  border-radius: 30px;
}

.bh-phone__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px 8px;
  background-color: var(--bh-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.bh-phone__time { letter-spacing: 0.01em; }

.bh-phone__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bh-phone__signal { height: 9px; width: auto; display: block; }
.bh-phone__batt { height: 10px; width: auto; display: block; }
.bh-phone__net { font-size: 10px; font-weight: 600; }

.bh-phone__shot {
  display: block;
  width: 100%;
  height: 346px;
  object-fit: cover;
  object-position: top center;
  border: 0;
}

/* Safari chrome */
.bh-phone__chrome {
  background: #f7f7f8;
  border-top: 1px solid #e6e6e8;
  padding: 8px 10px 0;
}

.bh-phone__url {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.1);
  font-size: 10px;
  color: #4d4d4d;
}

.bh-phone__aa { color: #6f6f6f; font-weight: 500; line-height: 1; }
.bh-phone__aa small { font-size: 0.72em; }

.bh-phone__host {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #262626;
}

.bh-phone__host svg { height: 9px; width: auto; opacity: 0.75; }
.bh-phone__reload { height: 11px; width: auto; color: #6f6f6f; }

.bh-phone__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px 5px;
  color: var(--bh-brand);
}

.bh-phone__nav svg { height: 15px; width: auto; display: block; }
.bh-phone__nav svg.is-dim { opacity: 0.32; }

.bh-phone__home {
  display: block;
  width: 34%;
  height: 4px;
  margin: 0 auto 7px;
  background: #1c1c1e;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Archive: post list + sidebar
   -------------------------------------------------------------------------- */

.bh-archive { padding: 88px 0 0; }

.bh-archive__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.bh-archive__main { min-width: 0; }

/* Section label row, styled like the reference's tag filter bar */
.bh-tabs {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  border-bottom: 1px solid var(--bh-border);
}

.bh-tab {
  display: inline-block;
  padding: 0 0 12px;
  margin-bottom: -1px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bh-ink-muted);
  border-bottom: 2px solid transparent;
}

.bh-tab.is-active {
  color: var(--bh-ink);
  border-bottom-color: var(--bh-ink);
}

.bh-list {
  background-color: var(--bh-bg-tone);
  border-radius: 0 0 var(--bh-radius-lg) var(--bh-radius-lg);
}

/* space between one section (list) and the next section's label row */
.bh-list + .bh-tabs { margin-top: 48px; }

.bh-post {
  display: grid;
  grid-template-columns: 219px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  position: relative;
}

.bh-post--no-thumb { grid-template-columns: minmax(0, 1fr); }

.bh-post + .bh-post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  width: calc(100% - 48px);
  height: 1px;
  background-color: var(--bh-border);
}

.bh-post__thumb { display: block; }

.bh-post__thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  background-color: #efece4;
}

.bh-post__body { min-width: 0; }

.bh-post__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.bh-post__title a {
  color: var(--bh-ink);
  text-decoration: none;
}

.bh-post__title a:hover { color: var(--bh-brand); }

.bh-post__excerpt {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bh-ink-tone);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bh-post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--bh-ink-tone);
}

.bh-post__meta .bh-dot { color: #b8b3a6; }

.bh-post__badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bh-ink-muted);
}

.bh-archive__more {
  display: flex;
  justify-content: center;
  padding: 48px 0 0;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.bh-sidebar { position: sticky; top: 24px; }

/* Same header band as .bh-tabs so the sidebar card starts on exactly the same
   line as the post list panel. 13px, not 12px: over in .bh-tabs the active
   tab's 2px bar sits on the row's 1px rule via margin-bottom:-1px, which makes
   that row 1px taller than padding alone would suggest. */
.bh-sidebar__label {
  margin: 0;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--bh-border);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bh-ink);
}

.bh-card {
  padding: 24px;
  background-color: var(--bh-bg-tone);
  border-radius: var(--bh-radius-lg);
}

.bh-card p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--bh-ink-tone);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media screen and (max-width: 991px) {
  .bh-archive__grid { grid-template-columns: minmax(0, 1fr); }
  .bh-sidebar { position: static; max-width: 445px; }
  .bh-hero__card { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 40px; }
  .bh-hero__arrow { width: 76px; right: 12px; top: 40px; }
  .bh-archive { padding-top: 64px; }
}

@media screen and (max-width: 640px) {
  .bh-hero { padding-top: 8px; }
  .bh-hero__title { margin-bottom: 32px; }
  .bh-hero__arrow { display: none; }
  .bh-hero__card { padding: 24px; border-radius: var(--bh-radius-lg); }
  .bh-hero__body p { font-size: 16px; }
  .bh-phone { width: 236px; }
  .bh-phone__shot { height: 360px; }

  .bh-form--inline .bh-form__row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
  }
  .bh-form--inline .bh-form__input {
    width: 100%;
    border: 1px solid var(--bh-border);
    border-radius: var(--bh-radius-pill);
    background-color: var(--bh-surface);
    padding: 13px 20px;
  }
  .bh-form--inline .bh-btn { width: 100%; }

  .bh-post { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
  .bh-post + .bh-post::before { left: 20px; width: calc(100% - 40px); }
  .bh-post__thumb img { aspect-ratio: 2 / 1; }
  .bh-archive__more { padding-top: 32px; }
  .bh-archive { padding-top: 48px; }
}

/* --------------------------------------------------------------------------
   Taxonomy term list (/tags/, /categories/)
   Descriptions are optional: a term with none simply drops that line and the
   count stays pinned to the bottom of the card, so rows still line up.
   -------------------------------------------------------------------------- */

.bh-terms { padding: 40px 0 0; }

.bh-terms__head {
  max-width: 40rem;
  margin: 0 auto 56px;
  text-align: center;
}

.bh-terms__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--bh-ink);
}

.bh-terms__blurb {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--bh-ink-tone);
}

.bh-terms__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.bh-term {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 24px;
  background-color: var(--bh-bg-tone);
  border-radius: var(--bh-radius);
  text-decoration: none;
  transition: background-color .18s ease;
}

.bh-term:hover,
.bh-term:focus-visible { background-color: #f2f0ea; }

.bh-term__name {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--bh-ink);
}

.bh-term:hover .bh-term__name { color: var(--bh-brand); }

.bh-term__desc {
  margin: 0;
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bh-ink-tone);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* pushes the count down whether or not a description is present */
.bh-term__count {
  margin: 4px 0 0;
  margin-top: auto;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--bh-ink);
}

.bh-terms__empty {
  margin: 0;
  font-size: 16px;
  color: var(--bh-ink-tone);
  text-align: center;
}

@media screen and (max-width: 991px) {
  .bh-terms__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bh-terms__head { margin-bottom: 40px; }
}

@media screen and (max-width: 767px) {
  .bh-terms__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

@media screen and (max-width: 480px) {
  .bh-terms__grid { grid-template-columns: minmax(0, 1fr); }
  .bh-terms { padding-top: 8px; }
  .bh-terms__blurb { font-size: 16px; }
}
