/*
 * blog.css: blog archive and article pages, framework-free.
 *
 * Everything is namespaced so it can be dropped into an existing site:
 *   - classes start with `bp-` ("blog page"),
 *   - variables start with `--bp-`,
 *   - base styles (fonts, headings, resets) apply only inside an element with
 *     the class `bp`. Put `bp` on the outermost element of each blog template.
 *
 * Two blocks of variables:
 *
 *   SKIN   fonts and colours. Replace them with the target brand's, or point
 *          them at the site's own tokens (--bp-color-ink: var(--site-ink)).
 *   SCALE  radii and motion. Keep them: together with the sizes below they are
 *          what makes these pages look like this design.
 *
 * Sizes are in rem and assume a 16px root. The numbers in the comments are the
 * pixel values at that root, measured on the original storefront (desktop
 * 1440px wide unless a breakpoint is named).
 *
 * Breakpoints used (min-width): 512 two-column grid, 768 article h3 grows,
 * 1024 headline step + three-column grid + larger section padding, and the
 * container steps 576 / 768 / 992 / 1200 / 1400.
 */

:root {
  /* ===== SKIN: replace per brand ===== */
  --bp-font-display: "Bodoni Moda", "Playfair Display", Georgia, "Times New Roman", serif;
  --bp-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --bp-weight-display: 400;             /* headings; a sans-only brand wants 500 or 600 */
  --bp-tracking-display: -0.02em;       /* headings; 0 for Arabic, Hebrew and other joined scripts */

  --bp-color-ink: #141413;             /* headings, strong text, active pill */
  --bp-color-body: #3d3d3a;             /* paragraphs, excerpts */
  --bp-color-muted: #6c6a64;            /* meta line, breadcrumbs, page numbers */
  --bp-color-accent-text: #a65134;      /* the accent used AS TEXT: >= 4.5:1 on every surface below */
  --bp-color-accent-fill: #bb5a3a;      /* the accent as a button fill under white text: >= 4.5:1 */
  --bp-color-accent-fill-hover: #a9583e;
  --bp-color-on-accent: #ffffff;
  --bp-color-surface-soft: #f5f0e8;     /* related-posts band */
  --bp-color-surface-card: #efe9de;     /* image wells, chips, CTA card, table head */
  --bp-color-surface-card-strong: #e8e0d2; /* chip hover */
  --bp-color-hairline: #e6dfd8;         /* borders and dividers */
  --bp-color-on-dark: #faf9f5;          /* text on dark: active pill, wide-hero title */

  /* ===== SCALE: keep ===== */
  --bp-radius-card: 12px;               /* card image, featured image, CTA card */
  --bp-radius-img: 8px;                 /* images inside the article, buttons */
  --bp-radius-pill: 9999px;
  --bp-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Base: only inside .bp ---------- */

.bp {
  font-family: var(--bp-font-body);
  font-size: 1rem;                      /* 16 */
  line-height: 1.5;                     /* 24 */
  color: var(--bp-color-ink);
  -webkit-font-smoothing: antialiased;
}

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

/* Base element rules use :where(), which adds no specificity, so every single-class
   rule below (.bp-pill, .bp-button, ...) wins over them without any tricks. */

.bp :where(img) {
  display: block;
  max-width: 100%;
}

.bp :where(a) {
  color: inherit;
  text-decoration: none;
}

.bp :where(a, button):focus-visible {
  outline: 1px solid var(--bp-color-accent-fill);
  outline-offset: 1px;
  border-radius: 2px;
}

/* Every heading: display face, regular weight. */
.bp :where(h1, h2, h3, h4) {
  margin: 0;
  font-family: var(--bp-font-display);
  font-weight: var(--bp-weight-display);
  font-style: normal;
  color: var(--bp-color-ink);
  font-optical-sizing: auto;
}

/* h1 to h3 are slightly tightened; h4 is not (same as the original). */
.bp :where(h1, h2, h3) {
  letter-spacing: var(--bp-tracking-display);
}

.bp :where(ul, ol) {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Page container ---------- */
/* 24px side padding at every width; the max-width steps up like Bootstrap's. */

.bp-container {
  box-sizing: border-box;               /* the container must not depend on a global reset */
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 576px) { .bp-container { max-width: 540px; } }
@media (min-width: 768px) { .bp-container { max-width: 720px; } }
@media (min-width: 992px) { .bp-container { max-width: 960px; } }
@media (min-width: 1200px) { .bp-container { max-width: 1140px; } }
@media (min-width: 1400px) { .bp-container { max-width: 1320px; } }

/* Vertical padding of a page body: 40px, 64px from 1024. */
.bp-section {
  padding-block: 2.5rem;
}

@media (min-width: 1024px) {
  .bp-section { padding-block: 4rem; }
}

/* ---------- Archive page ---------- */

.bp-header {
  max-width: 48rem;                     /* 768 */
  margin-bottom: 2rem;                  /* 32 */
}

.bp-title {
  margin-bottom: 1rem;                  /* 16 */
  font-size: 2rem;                      /* 32 / 40 on phones */
  line-height: 1.25;
}

@media (min-width: 1024px) {
  .bp-title {
    font-size: 3rem;                    /* 48 / 48 from 1024: line-height 1, tight */
    line-height: 1;
  }
}

.bp-subtitle {
  margin: 0;
  font-size: 1.125rem;                  /* 18 / 29.25 */
  line-height: 1.625;
  color: var(--bp-color-body);
}

/* Category filter: pills. */
.bp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;                          /* 8 */
  margin-bottom: 2.5rem;                /* 40 */
}

.bp-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 1rem;               /* 6 / 16 */
  border: 1px solid var(--bp-color-hairline);
  border-radius: var(--bp-radius-pill);
  font-size: 0.875rem;                  /* 14 / 20 */
  line-height: 1.25rem;
  color: var(--bp-color-body);
  transition: color 150ms var(--bp-ease), border-color 150ms var(--bp-ease), background-color 150ms var(--bp-ease);
}

.bp-pill:hover {
  border-color: var(--bp-color-ink);
  color: var(--bp-color-ink);
}

.bp-pill[aria-current="page"] {
  border-color: var(--bp-color-ink);
  background: var(--bp-color-ink);
  color: var(--bp-color-on-dark);
}

/* Post grid: 1 column, 2 from 512, 3 from 1024. 24px between columns, 40px between rows. */
.bp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 1.5rem;
  width: 100%;
}

@media (min-width: 512px) {
  .bp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .bp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Post card: the whole card is one link. */
.bp-card {
  display: flex;
  flex-direction: column;
}

.bp-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--bp-radius-card);
  background: var(--bp-color-surface-card);
}

.bp-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms var(--bp-ease);
}

.bp-card:hover .bp-card-media img {
  transform: scale(1.03);
}

.bp-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;                          /* 8 */
  margin-top: 1rem;                     /* 16 */
}

/* Small uppercase category label above a card title. */
.bp-eyebrow {
  margin: 0;
  font-size: 0.75rem;                   /* 12 / 16 */
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--bp-color-accent-text);
}

.bp-card-title {
  font-size: 1.5rem;                    /* 24 / 33 */
  line-height: 1.375;
}

.bp-card:hover .bp-card-title {
  color: var(--bp-color-accent-text);
}

.bp-card-excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--bp-color-body);          /* 16 / 24, three lines at most */
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.bp-card-meta {
  margin: 0;
  font-size: 0.875rem;                  /* 14 / 20 */
  line-height: 1.25rem;
  color: var(--bp-color-muted);
}

/* Numbered pagination: quiet text, centred; the current page is ink. */
.bp-pagination {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.75rem;                         /* 12 */
  margin-top: 3rem;                     /* 48 */
}

.bp-pagination a,
.bp-pagination span {
  font-size: 1.125rem;                  /* 18 / 28.8, weight 500 */
  line-height: 1.8rem;
  font-weight: 500;
  color: var(--bp-color-muted);
}

.bp-pagination a:hover {
  color: var(--bp-color-body);
}

.bp-pagination [aria-current="page"] {
  color: var(--bp-color-ink);
}

/* Loading skeleton: six pulsing cards in the same grid. */
.bp-skeleton > * {
  animation: bp-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.bp-skeleton .bp-bar {
  border-radius: 4px;
  background: var(--bp-color-surface-card);
}

@keyframes bp-pulse {
  50% { opacity: 0.5; }
}

/* ---------- Article page ---------- */

/* The reading column: 768px wide, centred. */
.bp-column {
  max-width: 48rem;
  margin-inline: auto;
}

.bp-breadcrumbs {
  margin-bottom: 1.5rem;                /* 24 */
  font-size: 0.875rem;                  /* 14 / 20 */
  line-height: 1.25rem;
  color: var(--bp-color-muted);
}

.bp-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.bp-breadcrumbs a:hover {
  color: var(--bp-color-ink);
}

.bp-article-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;                            /* 16 between chips, title, intro, meta */
  margin-bottom: 2rem;                  /* 32 */
}

.bp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bp-chip {
  display: inline-block;
  padding: 0.25rem 0.75rem;             /* 4 / 12 */
  border-radius: var(--bp-radius-pill);
  background: var(--bp-color-surface-card);
  font-size: 0.75rem;                   /* 12 / 16, uppercase, tracked */
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--bp-color-accent-text);
  transition: background-color 150ms var(--bp-ease);
}

.bp-chip:hover {
  background: var(--bp-color-surface-card-strong);
}

.bp-article-title {
  font-size: 2rem;                      /* 32 / 40 on phones */
  line-height: 1.25;
}

@media (min-width: 1024px) {
  .bp-article-title {
    font-size: 3rem;                    /* 48 / 48 from 1024 */
    line-height: 1;
  }
}

.bp-intro {
  margin: 0;
  font-size: 1.125rem;                  /* 18 / 29.25 on phones */
  line-height: 1.625;
  color: var(--bp-color-body);
}

@media (min-width: 1024px) {
  .bp-intro {
    font-size: 1.25rem;                 /* 20 / 28 from 1024 */
    line-height: 1.75rem;
  }
}

/* "By X · 23 October 2026 · 4 min read": middots between parts. */
.bp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;                 /* 4 / 12 */
  margin: 0;
  font-size: 0.875rem;                  /* 14 / 20 */
  line-height: 1.25rem;
  color: var(--bp-color-muted);
}

.bp-meta > span {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bp-featured {
  position: relative;
  aspect-ratio: 16 / 9;                 /* 768 x 432 in the column */
  margin-bottom: 2.5rem;                /* 40 */
  overflow: hidden;
  border-radius: var(--bp-radius-card);
  background: var(--bp-color-surface-card);
}

.bp-featured img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Article body ("prose") ---------- */
/* 18px on 1.625 (29.25px). Paragraphs in the body colour, headings in ink. */

.bp-prose {
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--bp-color-body);
}

.bp-prose p {
  margin: 0 0 1rem;
}

/* h2 inherits the 1.625 body leading (52px lines): airy, and part of the look. */
.bp-prose h2 {
  margin: 2rem 0 1.5rem;
  font-size: 2rem;                      /* 32 */
}

.bp-prose h3 {
  margin: 1.5rem 0 1rem;
  font-size: 1.25rem;                   /* 20 / 28 on phones, 24 / 32 from 768 */
  line-height: 1.75rem;
}

@media (min-width: 768px) {
  .bp-prose h3 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

.bp-prose h4 {
  margin: 1.25rem 0 1rem;
  font-size: 1.125rem;                  /* 18 / 28 */
  line-height: 1.75rem;
}

.bp-prose ul { margin: 0 0 1rem; padding-left: 1.5rem; list-style: disc; }
.bp-prose ol { margin: 0 0 1rem; padding-left: 1.5rem; list-style: decimal; }
.bp-prose li { margin-bottom: 0.5rem; }

.bp-prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--bp-color-hairline);
  font-style: italic;
  color: var(--bp-color-body);
}

.bp-prose a {
  color: var(--bp-color-accent-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.bp-prose strong { font-weight: 600; color: var(--bp-color-ink); }
.bp-prose em { font-style: italic; }

.bp-prose img {
  height: auto;
  margin: 1.5rem 0;
  border-radius: var(--bp-radius-img);
}

.bp-prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--bp-color-hairline);
}

.bp-prose table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.875rem;                  /* 14 */
}

.bp-prose thead th {
  padding: 0.75rem 1rem;                /* 12 / 16 */
  border-bottom: 2px solid var(--bp-color-hairline);
  background: var(--bp-color-surface-card);
  text-align: left;
  font-weight: 600;
  color: var(--bp-color-ink);
}

.bp-prose tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bp-color-hairline);
}

/* ---------- After the article ---------- */

/* A nudge from the article to the shop (or newsletter, or contact). */
.bp-cta {
  margin-top: 4rem;                     /* 64 */
  padding: 2rem;                        /* 32 */
  border-radius: var(--bp-radius-card);
  background: var(--bp-color-surface-card);
  text-align: center;
}

.bp-cta h2 {
  font-size: 1.5rem;                    /* 24 / 32 */
  line-height: 2rem;
}

.bp-cta p {
  max-width: 28rem;
  margin: 0.5rem auto 0;
  color: var(--bp-color-body);
}

.bp-button {
  display: inline-flex;
  margin-top: 1.5rem;                   /* 24 */
  padding: 0.75rem 1.5rem;              /* 12 / 24, text 16 / 24 */
  border-radius: var(--bp-radius-img);
  background: var(--bp-color-accent-fill);
  color: var(--bp-color-on-accent);
  transition: background-color 150ms var(--bp-ease);
}

.bp-button:hover {
  background: var(--bp-color-accent-fill-hover);
}

.bp-back {
  display: inline-block;
  margin-top: 2.5rem;                   /* 40 */
  font-size: 0.875rem;                  /* 14 / 20 */
  line-height: 1.25rem;
  color: var(--bp-color-accent-text);
  text-underline-offset: 4px;
}

.bp-back:hover {
  text-decoration: underline;
}

/* "Keep reading": three more posts on a soft band, below the article. */
.bp-related {
  border-top: 1px solid var(--bp-color-hairline);
  background: var(--bp-color-surface-soft);
}

.bp-related .bp-container {
  padding-block: 3rem;                  /* 48, 64 from 1024 */
}

@media (min-width: 1024px) {
  .bp-related .bp-container { padding-block: 4rem; }
}

.bp-related-title {
  margin-bottom: 2rem;                  /* 32 */
  font-size: 1.5rem;                    /* 24 / 32, 32 from 1024 */
  line-height: 2rem;
}

@media (min-width: 1024px) {
  .bp-related-title { font-size: 2rem; }
}

/* ---------- Wide article: full-width image with the title over it ---------- */

.bp-hero {
  position: relative;
  width: 100%;
  height: 55vh;
  min-height: 380px;
  overflow: hidden;
}

.bp-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bp-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.7), rgb(0 0 0 / 0.3), rgb(0 0 0 / 0.2));
}

.bp-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 3rem;                 /* 48, 64 from 1024 */
}

@media (min-width: 1024px) {
  .bp-hero-content { padding-bottom: 4rem; }
}

.bp-hero-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 48rem;
}

.bp-hero .bp-article-title { color: var(--bp-color-on-dark); }

.bp-hero .bp-intro {
  max-width: 36rem;
  color: rgb(250 249 245 / 0.8);        /* on-dark at 80% */
}

.bp-hero .bp-meta { color: rgb(250 249 245 / 0.8); }

@media (prefers-reduced-motion: reduce) {
  .bp-card-media img,
  .bp-pill,
  .bp-chip,
  .bp-button { transition: none; }
  .bp-skeleton > * { animation: none; }
}


/* =====================================================================
 * Delta Livings skin (appended to the skill's blog.css)
 *
 * Only the SKIN roles change; the scale, layout and components above are
 * the blog-page-design reference, untouched.
 *
 * - Sans-only brand (the site uses the system sans), so the display role
 *   uses the same family at weight 500, as the skill prescribes.
 * - Accent is the brand red #ed1b25. It measures 4.39:1 on white, so text
 *   uses #c8141d (5.88 on white, 5.12 on card, 4.63 on card-strong) and
 *   the button fill #d4141e (white text 5.36:1); hover darkens to #b3121a.
 * - Greys follow the site's zinc text colour. Muted #6b6b74 is 5.28:1 on
 *   white, 4.88 on soft, 4.59 on card.
 * ===================================================================== */
:root {
  --bp-font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --bp-font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --bp-weight-display: 500;
  --bp-tracking-display: -0.02em;

  --bp-color-ink: #18181b;
  --bp-color-body: #3f3f46;
  --bp-color-muted: #6b6b74;
  --bp-color-accent-text: #c8141d;
  --bp-color-accent-fill: #d4141e;
  --bp-color-accent-fill-hover: #b3121a;
  --bp-color-on-accent: #ffffff;
  --bp-color-surface-soft: #f6f6f7;
  --bp-color-surface-card: #efeff1;
  --bp-color-surface-card-strong: #e4e4e7;
  --bp-color-hairline: #e4e4e7;
  --bp-color-on-dark: #fafafa;

  /* Height of the site's fixed navigation bar (81px measured at desktop). */
  --delta-header-offset: 81px;
}

/* The site header is position: fixed; push the blog below it. */
.delta-blog-offset {
  padding-top: var(--delta-header-offset);
}

/* Theme base styles (Tailwind @layer base) style bare h1-h6, p and a with
   margins and sizes; the blog's own classes set every value it needs, so
   only reset the leftovers the theme adds. */
.bp p { margin-top: 0; }
.bp .bp-card-title,
.bp .bp-title,
.bp .bp-article-title,
.bp .bp-related-title,
.bp .bp-cta h2 { margin-top: 0; }
.bp .bp-card:hover,
.bp .bp-pill:hover,
.bp .bp-chip:hover,
.bp .bp-button:hover,
.bp .bp-breadcrumbs a:hover,
.bp .bp-pagination a:hover { text-decoration: none; }
.bp .bp-button { color: var(--bp-color-on-accent); }

/* WordPress content inside the article column. */
.bp-prose table {
  display: block;
  overflow-x: auto;              /* wide comparison tables scroll on phones */
}
@media (min-width: 768px) {
  .bp-prose table { display: table; overflow: visible; }
}
.bp-prose .alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.bp-prose .alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.bp-prose .aligncenter { margin-inline: auto; }
.bp-prose .wp-caption-text,
.bp-prose figcaption { font-size: 0.875rem; line-height: 1.25rem; color: var(--bp-color-muted); }
.bp-prose ol { list-style-position: outside; }
