/* =====================================================================
   Blog (2026-09-28: the owner's blog admin). /blog/ and every article are
   built by static-v2/_server/blog/core.py inside the site's own frame
   (_blog/shell.html, from blog/index.html), so the header, footer, fonts
   and colours are the site's. This file is only what the blog adds: the
   title bands, the article cards and the article's reading layout.
   ===================================================================== */

/* ---------------------------------------------------------- title bands */
/* The mocha band behind the title runs edge to edge under the header
   (.u-mocha-title in unify.css draws it). */

.u-blog__head,
.u-post__head {
  padding-top: var(--u-hero-top);
  color: var(--u-text);
}

.u-blog__eyebrow,
.u-post__crumb {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font: 600 0.72rem/1.4 var(--v2-body);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--u-gold-text);
}

.u-blog__eyebrow::after,
.u-post__crumb::after {
  content: "";
  width: clamp(28px, 4vw, 56px);
  height: 1px;
  background: linear-gradient(90deg, var(--u-gold), transparent);
}

.u-post__crumb a {
  color: inherit;
  text-decoration: none;
}

.u-blog__h1,
.u-post__title {
  margin: 0;
  font-family: var(--v2-display);
  font-weight: 400;
  font-size: var(--u-fs-title);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--u-head);
  max-width: none;          /* a long title uses the width, as on every page */
}

.u-post__meta {
  margin: 18px 0 0;
  font-family: var(--v2-body);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--u-sub);
}

/* ---------------------------------------------------------- the list */

.u-blog__list {
  padding-top: var(--u-open-pad);
  padding-bottom: var(--u-edge);
}

/* The list fills the page's width whatever the number of articles
   (2026-09-28, the user: "there should not be any white spaces", now and
   for every future article). The newest article runs the full width, its
   picture beside its words. The rest go three to a row (two on a tablet,
   one on a phone); a last row that is not full is filled by its cards
   growing, and a card left alone in its row takes the full-width form. */
.u-blog__grid {
  --cols: 3;
  display: flex;
  flex-wrap: wrap;
  gap: var(--u-grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.u-blog__card {
  flex: 1 1 calc((100% - (var(--cols) - 1) * var(--u-grid-gap)) / var(--cols));
  margin: 0;
  min-width: 0;
}

.u-blog__card:first-child {
  flex-basis: 100%;
}

@media (max-width: 1100px) {
  .u-blog__grid { --cols: 2; }
}

@media (max-width: 700px) {
  .u-blog__grid { --cols: 1; }
}

/* The full-width form: picture on the left, words on the right. */
@media (min-width: 701px) {
  .u-blog__card:first-child .u-blog__link,
  .u-blog__card:last-child:nth-child(3n+2) .u-blog__link {
    flex-direction: row;
  }

  .u-blog__card:first-child .u-blog__cover,
  .u-blog__card:last-child:nth-child(3n+2) .u-blog__cover {
    flex: 0 0 56%;
    aspect-ratio: 3 / 2;
  }

  .u-blog__card:first-child .u-blog__body,
  .u-blog__card:last-child:nth-child(3n+2) .u-blog__body {
    justify-content: center;
    padding: clamp(24px, 3vw, 48px);
  }

  .u-blog__card:first-child .u-blog__title,
  .u-blog__card:last-child:nth-child(3n+2) .u-blog__title {
    font-size: var(--u-fs-section);
  }

  .u-blog__card:first-child .u-blog__excerpt,
  .u-blog__card:last-child:nth-child(3n+2) .u-blog__excerpt {
    -webkit-line-clamp: 5;
    font-size: 1rem;
  }
}

/* Two to a row on a tablet: the lone card there is an even one. */
@media (min-width: 701px) and (max-width: 1100px) {
  .u-blog__card:last-child:nth-child(3n+2):not(:nth-child(2n)) .u-blog__link {
    flex-direction: column;
  }

  .u-blog__card:last-child:nth-child(3n+2):not(:nth-child(2n)) .u-blog__cover {
    flex: none;
  }

  .u-blog__card:last-child:nth-child(3n+2):not(:nth-child(2n)) .u-blog__title {
    font-size: var(--u-fs-card);
  }

  .u-blog__card:last-child:nth-child(2n):not(:first-child) .u-blog__link {
    flex-direction: row;
  }

  .u-blog__card:last-child:nth-child(2n):not(:first-child) .u-blog__cover {
    flex: 0 0 56%;
  }

  .u-blog__card:last-child:nth-child(2n):not(:first-child) .u-blog__body {
    justify-content: center;
    padding: clamp(24px, 3vw, 48px);
  }

  .u-blog__card:last-child:nth-child(2n):not(:first-child) .u-blog__title {
    font-size: var(--u-fs-section);
  }

  .u-blog__card:last-child:nth-child(2n):not(:first-child) .u-blog__excerpt {
    -webkit-line-clamp: 5;
    font-size: 1rem;
  }
}

.u-blog__link {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--u-card-edge);
  border-radius: 16px;
  background: var(--u-card-bg);
  box-shadow: var(--u-card-shadow);
  color: inherit;
  text-decoration: none !important;
  transition: transform 0.6s var(--u-ease), box-shadow 0.6s var(--u-ease), border-color 0.45s var(--u-ease);
}

/* The gold accent on the top edge, as on every box. */
.u-blog__link::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 64px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--u-gold), transparent);
  transition: width 0.6s var(--u-ease);
}

.u-blog__cover {
  margin: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: rgba(116, 96, 75, 0.14);
}

.u-blog__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--u-ease);
}

/* An article without a picture: the zodiac wheel on mocha. */
.u-blog__cover--none {
  background: url("/premium/img/zodiac-wheel.svg") center / 78% no-repeat, var(--u-mocha, #74604b);
}

@media (hover: hover) and (pointer: fine) {
  .u-blog__link:hover {
    transform: translateY(-4px);
    border-color: var(--u-card-edge-hover);
    box-shadow: var(--u-card-shadow-hover);
  }

  .u-blog__link:hover::after { width: 132px; }

  .u-blog__link:hover .u-blog__cover img { transform: scale(1.04); }

  .u-blog__link:hover .u-blog__more span { transform: translateX(4px); }
}

.u-blog__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 1.8vw, 26px) clamp(18px, 1.8vw, 26px) clamp(20px, 2vw, 28px);
}

.u-blog__meta {
  margin: 0;
  font-family: var(--v2-body);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--u-mute);
}

.u-blog__title {
  margin: 0;
  font-family: var(--v2-display);
  font-weight: 400;
  font-size: var(--u-fs-card);
  line-height: 1.15;
  color: var(--u-head);
}

.u-blog__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-family: var(--v2-body);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--u-text);
}

.u-blog__more {
  margin-top: auto;
  padding-top: 6px;
  font: 600 0.74rem/1 var(--v2-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--u-gold-text);
}

.u-blog__more span {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.4s var(--u-ease);
}

.u-blog__empty {
  margin: 0;
  padding: clamp(40px, 6vw, 80px) 0;
  text-align: center;
  font-family: var(--v2-display);
  font-size: var(--u-fs-sub);
  color: var(--u-head);
}

/* Pages of older articles. */
.u-blog__pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(28px, 3vw, 44px);
  font-family: var(--v2-body);
}

.u-blog__num,
.u-blog__step {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--u-card-edge);
  border-radius: 999px;
  color: var(--u-head);
  text-decoration: none !important;
  font-size: 0.9rem;
}

.u-blog__num[aria-current] {
  border-color: transparent;
  background: var(--u-btn);
  color: var(--u-btn-text);
}

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

/* The article uses the page's full width, like every other page (2026-09-28,
   the user: no white space at the sides, in this article or any future one). */
.u-post__main {
  max-width: none;
  margin: 0;
  padding-top: var(--u-open-pad);
  padding-bottom: var(--u-edge);
}

.u-post__cover {
  margin: 0 0 clamp(28px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--u-card-edge);
  border-radius: 16px;
  box-shadow: var(--u-card-shadow);
}

.u-post__cover img {
  display: block;
  width: 100%;
  height: auto;
}

.u-post__body {
  font-family: var(--v2-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.85;
  color: var(--u-text);
}

.u-post__body > :first-child { margin-top: 0 !important; }

.u-post__body p,
.u-post__body ul,
.u-post__body ol {
  margin: 0 0 1.15em !important;
}

.u-post__body h2,
.u-post__body h3,
.u-post__body h4 {
  margin: 1.7em 0 0.55em !important;
  font-family: var(--v2-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--u-head);
}

.u-post__body h2 { font-size: var(--u-fs-section); }
.u-post__body h3 { font-size: var(--u-fs-sub); }
.u-post__body h4 { font-size: var(--u-fs-card); }

.u-post__body strong { color: var(--u-head); }

.u-post__body a {
  color: var(--u-gold-text);
  text-decoration: underline;
  text-decoration-color: var(--u-underline, currentColor);
  text-underline-offset: 3px;
}

.u-post__body ul,
.u-post__body ol {
  padding-left: 1.4em;
}

.u-post__body li { margin-bottom: 0.4em; }

.u-post__body li::marker { color: var(--u-gold); }

.u-post__body blockquote {
  margin: 1.6em 0 !important;
  padding: 0.2em 0 0.2em 1.3em;
  border-left: 3px solid var(--u-gold);
  font-family: var(--v2-display);
  font-style: italic;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.4;
  color: var(--u-head);
}

.u-post__body blockquote p:last-child { margin-bottom: 0 !important; }

/* Pictures in an article fill its width, whatever size they were added at
   (no white space beside a small one). */
.u-post__body img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 1.6em 0;
  border-radius: 12px;
}

.u-post__body hr {
  margin: 2.4em auto;
  width: 64px;
  border: 0;
  border-top: 1px solid var(--u-gold);
}

.u-post__foot {
  margin-top: clamp(36px, 4vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--u-rule);
}

.u-post__back {
  font: 600 0.78rem/1 var(--v2-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--u-gold-text);
  text-decoration: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .u-blog__link,
  .u-blog__cover img,
  .u-blog__more span {
    transition: none;
  }
}
