/* "Kind Words", the WarmEnvelope journal: the blog Brands renders with brands/*.liquid, and the
   policies and newsletter pages it renders into _layout.html. Plain CSS on the tokens of
   styles.css (no new hex colours), classes bl-*. */

.brands-frame { background: var(--paper); }
.brands-page { max-width: 820px; }
.bl-main { display: block; }

/* Shared */
.bl { max-width: 1120px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 4rem; }
.bl-label { margin: 0 0 1rem; color: var(--brick); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .82rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.bl-meta { margin: .6rem 0 0; color: var(--muted); font-size: .95rem; }
.bl-link { color: var(--brick-dark); font-weight: 700; }
.bl-section { margin-top: 3.5rem; }
.bl-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
.bl-count { margin: 0 0 1rem; color: var(--muted); }
.bl-stretch { color: inherit; text-decoration: none; }
.bl-stretch::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.bl-stretch:focus-visible { outline: none; }
.bl-lead:has(.bl-stretch:focus-visible), .bl-card:has(.bl-stretch:focus-visible) { outline: 4px solid var(--focus); outline-offset: 4px; }

/* Hero */
.bl-hero { max-width: 760px; margin: 0 0 2.75rem; }
.bl-hero__title { margin: 0 0 1rem; font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: -.03em; }
.bl-hero__title em { color: var(--brick); font-style: italic; }
.bl-hero__intro { color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.25rem); }
.bl-hero__intro p { margin: 0 0 .6rem; }

/* Postmark: a round date stamp on every letter */
.bl-postmark { position: absolute; top: .9rem; right: .9rem; z-index: 1; width: 4.6rem; height: 4.6rem; display: grid; place-content: center; border: 2px dashed var(--brick); border-radius: 50%; background: var(--letter); color: var(--brick); font-family: Georgia, serif; line-height: 1.05; text-align: center; text-transform: uppercase; transform: rotate(-8deg); box-shadow: 0 0 0 4px var(--letter); }
.bl-postmark span { font-size: .62rem; letter-spacing: .14em; }
.bl-postmark strong { font-size: 1.45rem; }

/* Envelope illustration for articles without an image */
.bl-envelope { position: relative; width: 100%; height: 100%; min-height: 12rem; overflow: hidden; display: grid; place-items: center; background: var(--envelope); border: 1px solid var(--envelope-edge); }
.bl-envelope::before { content: ""; position: absolute; inset: 0; clip-path: polygon(0 0, 50% 58%, 100% 0); background: var(--envelope-flap); }
.bl-envelope::after { content: ""; position: absolute; inset: 0; clip-path: polygon(0 100%, 50% 52%, 100% 100%); background: var(--envelope); filter: brightness(.96); }
.bl-envelope__card { position: relative; z-index: 1; max-width: 70%; margin-top: -18%; padding: 1rem 1.2rem; background: var(--letter); border: 1px solid var(--line); color: var(--brick); font-family: Georgia, serif; font-size: 1.05rem; line-height: 1.3; text-align: center; transform: rotate(-2deg); box-shadow: 0 10px 22px rgba(52, 40, 32, .12); }

/* Latest letter */
.bl-lead { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--letter); box-shadow: 0 18px 40px rgba(54, 45, 38, .1); transition: transform .2s ease, box-shadow .2s ease; }
.bl-lead:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(54, 45, 38, .14); }
.bl-lead__media { position: relative; min-height: 18rem; background: var(--cream); }
.bl-lead__media picture, .bl-lead__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.bl-lead__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 3rem); }
.bl-lead__title { margin: 0; font-family: Georgia, serif; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; }
.bl-lead__text { margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }
.bl-more { margin-top: 1.4rem; color: var(--brick-dark); font-weight: 750; }
.bl-arrow { display: inline-block; transition: transform .2s ease; }
.bl-lead:hover .bl-arrow { transform: translateX(4px); }

/* The shelf of letters */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; margin: 0; padding: 0; list-style: none; }
.bl-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 8px 22px rgba(54, 45, 38, .07); transition: transform .2s ease, box-shadow .2s ease; }
.bl-card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 16px 34px rgba(54, 45, 38, .12); }
.bl-card__media { position: relative; aspect-ratio: 3 / 2; background: var(--cream); }
.bl-card__media picture, .bl-card__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.bl-card__media .bl-envelope { min-height: 0; border: 0; }
.bl-card__media .bl-envelope__card { font-size: .92rem; padding: .7rem .9rem; }
.bl-card__media .bl-postmark { width: 3.8rem; height: 3.8rem; top: .7rem; right: .7rem; }
.bl-card__media .bl-postmark strong { font-size: 1.15rem; }
.bl-card__body { flex: 1; padding: 1.2rem 1.25rem 1.3rem; }
.bl-card__title { margin: 0; font-family: Georgia, serif; font-size: 1.25rem; line-height: 1.25; }
.bl-card__text { margin: .55rem 0 0; color: var(--muted); font-size: .98rem; }

/* Empty journal */
.bl-empty { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); align-items: center; gap: 2rem; padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: 20px; background: var(--letter); }
.bl-empty .bl-envelope { min-height: 14rem; border-radius: 8px; }
.bl-empty__title { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.bl-empty p { margin: 0; color: var(--muted); }

/* One article: a letter on warm paper */
.bl-letter { max-width: 46rem; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid var(--line); border-radius: 6px; background: var(--letter); box-shadow: 0 22px 50px rgba(54, 45, 38, .1); }
.bl-back { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--brick-dark); font-weight: 700; text-decoration: none; }
.bl-back:hover { text-decoration: underline; }
.bl-letter__head { position: relative; margin: 1rem 0 2rem; padding-right: 5.5rem; padding-bottom: 1.5rem; border-bottom: 1px dashed var(--line); }
.bl-letter__head .bl-postmark { top: 0; right: 0; }
.bl-letter__title { margin: 0; font-size: clamp(2.1rem, 5vw, 3.2rem); letter-spacing: -.025em; }
.bl-letter__lede { margin: 1rem 0 0; color: var(--muted); font-family: Georgia, serif; font-size: 1.22rem; font-style: italic; }
.bl-figure { margin: 0 0 2rem; }
.bl-figure picture, .bl-figure__image { display: block; width: 100%; height: auto; border-radius: 8px; }
.bl-figure figcaption { margin-top: .5rem; color: var(--muted); font-size: .85rem; }
.bl-prose { font-family: Georgia, serif; font-size: 1.15rem; line-height: 1.7; }
.bl-prose > * + * { margin-top: 1.1em; }
.bl-prose p { margin: 0; }
.bl-prose h2, .bl-prose h3 { margin: 2rem 0 .5rem; line-height: 1.2; }
.bl-prose h2 { font-size: 1.7rem; }
.bl-prose h3 { font-size: 1.35rem; }
.bl-prose a { color: var(--brick-dark); }
.bl-prose ul, .bl-prose ol { padding-left: 1.4rem; }
.bl-prose li + li { margin-top: .35rem; }
.bl-prose blockquote { margin: 1.6rem 0; padding: .9rem 1.2rem; border-left: 4px solid var(--sage); background: var(--sage-soft); font-style: italic; }
.bl-prose img { max-width: 100%; height: auto; border-radius: 8px; }
.bl-prose table { width: 100%; border-collapse: collapse; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 1rem; }
.bl-prose th, .bl-prose td { padding: .5rem; border-bottom: 1px solid var(--line); text-align: left; }
.bl-disclaimer { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: .9rem; }

/* Earlier / newer */
.bl-pager { max-width: 46rem; margin: 2rem auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.bl-pager__item { display: flex; flex-direction: column; gap: .35rem; min-height: 44px; padding: 1.1rem 1.2rem; border: 1px solid var(--envelope-edge); border-radius: 10px; background: var(--envelope); color: var(--envelope-ink); text-decoration: none; box-shadow: 0 8px 18px rgba(54, 45, 38, .08); transition: transform .2s ease; }
.bl-pager__item:hover { transform: translateY(-2px); }
.bl-pager__item--next { grid-column: 2; text-align: right; }
.bl-pager__label { font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bl-pager__item strong { font-family: Georgia, serif; font-size: 1.12rem; line-height: 1.3; }

/* Invitation to make a card */
.bl-cta { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); max-width: 60rem; margin: 3.5rem auto 0; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 20px; background: var(--cream); border: 1px solid var(--line); }
.bl-cta__card { width: 8.5rem; aspect-ratio: 17 / 22; display: grid; place-items: center; border: 2px solid var(--brick); background: var(--letter); color: var(--brick); font-family: Georgia, serif; font-size: 1.15rem; font-weight: 700; transform: rotate(-3deg); box-shadow: 0 12px 26px rgba(52, 40, 32, .14); }
.bl-cta .eyebrow { margin-bottom: .4rem; }
.bl-cta__title { margin: 0 0 .6rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.bl-cta p { margin: 0 0 1.2rem; color: var(--muted); }

/* Newsletter (N-Form, added by Brands) */
.bl-newsletter { max-width: 60rem; margin: 0 auto 4rem; padding: 0 clamp(1rem, 4vw, 2.5rem); }

@media (max-width: 900px) {
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .bl-lead, .bl-empty { grid-template-columns: 1fr; }
  .bl-lead__media { min-height: 13rem; aspect-ratio: 3 / 2; }
  .bl-grid { grid-template-columns: 1fr; }
  .bl-pager { grid-template-columns: 1fr; }
  .bl-pager__item--next { grid-column: auto; }
  .bl-cta { grid-template-columns: 1fr; text-align: left; }
  .bl-cta__card { width: 6rem; }
  .bl-letter { border-radius: 0; margin-inline: calc(-1 * clamp(1rem, 4vw, 2.5rem)); border-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-lead, .bl-card, .bl-pager__item, .bl-arrow { transition: none; }
  .bl-lead:hover, .bl-card:hover, .bl-pager__item:hover { transform: none; }
}
