/* ============================================================
   Blog listing — Figma 750:433
   Numbers are the Figma pixel values at 1920 (1rem = 10px via the
   site's rem scale). Shared pieces are not restyled here: .tag,
   .btn and the footer come from style.css.
     hero    1920 x 860  · copy at 100,209 (690 wide)
     filter  1920 x 297  · bar 1744 x 97, six tabs
     grid    1720 wide   · cards 560 x 670, gap 20
   ============================================================ */

/* ---------- HERO (752:1045) ---------- */
.page-blog .hero { height: 86rem; min-height: 0; }

.hero-blog__copy {
  position: absolute;
  top: 20.9rem;
  left: var(--gutter);
  width: 69rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3.2rem;
}
.hero-blog__head,
.hero-blog__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}
.hero-blog__head { gap: 3.2rem; }
.hero-blog__foot { gap: 2.4rem; }

.hero-blog__title {
  display: flex;
  flex-direction: column;
  font-size: 8.2rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.06em;
  color: var(--white);
}
.hero-blog__line--sans  { font-family: var(--sans); }
.hero-blog__line--pixel { font-family: var(--pixel); line-height: normal; margin-top: -0.6rem; }
.hero-blog__lede { color: var(--muted-2); font-size: 2.4rem; letter-spacing: -0.06em; }
.hero-blog .hero__actions { justify-content: flex-start; }

/* ---------- ARTICLES (750:480) ----------
   The frame keeps the tabs and the grid in one section, ruled top and bottom,
   padded 100, with 60 between the bar and the first row. The six tabs are
   drawn 280 wide apart from "Software development" at 344, so the row keeps
   that ratio; the active tab takes the brand gradient and dark ink. */
.blog {
  padding: 10rem var(--gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.blog__bar {
  margin-bottom: 6rem;
  display: grid;
  grid-template-columns: 27.6rem 33.9rem 27.6rem 27.6rem 27.6rem 27.6rem;
}
.blog-filter__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 9.7rem;
  padding: 3.2rem 2rem;
  border: 1px solid var(--line);
  color: var(--white);
  font-size: 2.4rem;
  letter-spacing: -0.06em;
  text-align: center;
  background: transparent;
  transition: background .35s ease, color .35s ease;
}
/* neighbours share one rule rather than stacking two */
.blog-filter__tab + .blog-filter__tab { margin-left: -1px; }
.blog-filter__dot { width: 0.6rem; height: 0.6rem; background: var(--white); flex: none; }
.blog-filter__tab:hover { background: var(--surface); }
.blog-filter__tab.is-on {
  background: linear-gradient(90deg, var(--lavender), var(--accent));
  color: var(--surface);
  position: relative;      /* its edge sits above the neighbour's */
  z-index: 1;
}
.blog-filter__tab.is-on .blog-filter__dot { background: var(--surface); }

/* minmax(0,…) or the no-wrap title lines set each track's min-content width
   and the three columns come out uneven */
.blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.blog__empty { color: var(--muted-2); font-size: 2.4rem; }

.post { display: flex; min-width: 0; }
.post[hidden] { display: none; }
.post__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 75.8rem;
  background: var(--surface);
  border: 1px solid var(--muted-2);
  color: inherit;
}

/* The frame rules the image off from the body: the 558x320 image block carries
   a bottom stroke only (#858585, inside), so the 32rem stays the total height. */
.post__shot {
  display: block;
  height: 32rem;
  flex: none;
  overflow: hidden;
  background: var(--black);
  border-bottom: 1px solid var(--muted-2);
}
.post__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post__body {
  flex: 1;
  min-height: 0;
  padding: 3.2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.post__meta { display: flex; align-items: center; justify-content: space-between; gap: 2.4rem; }
.post__meta .tag { font-size: 1.6rem; padding: 0.6rem 1.4rem; }
.post__read { color: var(--white); font-size: 1.8rem; letter-spacing: -0.06em; white-space: nowrap; }

.post__copy { display: flex; flex-direction: column; gap: 1.6rem; min-width: 0; }
.post__title {
  display: flex;
  flex-direction: column;
  font-size: 3rem;
  line-height: 1.2;
  letter-spacing: -0.06em;
  color: var(--white);
}
/* the frame sets the first line sans and the second pixel with its last word in
   accent, and gives the pixel line two of the three lines the block is drawn at */
.post__line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post__line--pixel {
  font-family: var(--pixel);
  white-space: normal;
  text-overflow: clip;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.post__excerpt {
  color: var(--muted-2);
  font-size: 2rem;
  line-height: 1.3;
  letter-spacing: -0.06em;
  /* the card is a fixed 758, so the note is held to the three lines it is drawn with */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* the frame draws this as the outline button, sitting at the left */
.post__cta {
  margin-top: auto;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Hover is the button only: the whole card is the link, so js/hero.js already
   wipes the button's fill in from anywhere on the card. That fill is white on
   an outline button everywhere else; here it takes the brand gradient. */
.post__cta .btn__fill { background: linear-gradient(90deg, var(--lavender), var(--accent)); }

/* ---------- START A CONVERSATION (785:9456) ----------
   The shipped .contact band at its stock 571 height, on the frame's grid; only
   the two notch depths are drawn differently, the same pair the contact page
   uses. */
.page-blog .contact {
  background-color: var(--black);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: var(--grid-cell) var(--grid-cell);
  background-position: -1px -1px;
}
/* desktop only: these notch sizes are for the 1920 frame, and left to run on a
   phone they cut the tag off after its first word and clipped the note */
@media (min-width: 1200px) {
  .page-blog .contact__panel {
    clip-path: polygon(
      0 0, calc(100% - 27.85rem) 0, calc(100% - 27.85rem) 7.617rem, 100% 7.617rem,
      100% 100%, 6.6rem 100%, 6.6rem calc(100% - 8.4rem), 0 calc(100% - 8.4rem)
    );
  }
}

/* ---------- small screens ---------- */
@media (max-width: 1199px) {
  .page-blog .hero { height: auto; min-height: 0; flex-direction: column; align-items: stretch; padding: 14rem var(--gutter) 6rem; }
  .hero-blog__copy { position: static; width: auto; margin: 0; gap: 2rem; }
  .hero-blog__head { gap: 2rem; }
  .hero-blog__title { font-size: 4rem; }
  .hero-blog__line--pixel { margin-top: -0.2rem; }
  .hero-blog__lede { font-size: 1.8rem; }
  .hero-blog .hero__actions { flex-wrap: wrap; gap: 1.2rem; }

  .blog__bar { margin-bottom: 3.2rem; grid-template-columns: repeat(2, 1fr); }
  .blog-filter__tab { min-height: 6rem; padding: 1.6rem 1.2rem; font-size: 1.6rem; }
  .blog-filter__tab + .blog-filter__tab { margin-left: 0; }

  .blog { padding: 4.8rem var(--gutter); }
  .page-blog .contact { height: auto; }
  .blog__grid { grid-template-columns: 1fr; }
  .post__link { height: auto; }
  .post__shot { height: 20rem; }
  .post__body { padding: 2.4rem; gap: 2.4rem; }
  .post__title { font-size: 2rem; }
  /* both title lines are held to their drawn line count on the fixed-height
     desktop card; the card grows here, so neither needs clipping */
  .post__line { white-space: normal; overflow: visible; }
  .post__line--pixel { -webkit-line-clamp: none; line-clamp: none; display: block; }
  /* the card is a fixed height on the desktop grid, which is why the note is
     held to three lines there; here it grows, so let it read in full */
  .post__excerpt { -webkit-line-clamp: none; line-clamp: none; display: block; }
  .post__cta { font-size: 1.8rem; }
  .post__cta .btn__label { padding: 0 1.6rem; height: 4.6rem; }
  .post__cta .btn__icon { width: 4.6rem; height: 4.6rem; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog__bar { grid-template-columns: repeat(3, 1fr); }
}
