/* =========================================================
   CoffeeNCoders — blog.css: /blog/ only (blog.php). Loaded after main.css.
   Dark hero with the topic chips → light list: the newest post wide (cover left, text right), then a grid of three.
   A post without a picture gets a drawn cover (.bl-art: category + title on espresso with a copper glow).
   ========================================================= */

/* ---------- Hero ---------- */
.bl-hero {
  position: relative; overflow: hidden; color: var(--cream);
  padding: clamp(130px, 17vh, 190px) 0 clamp(56px, 6vw, 80px);
  background: radial-gradient(45% 60% at 85% 10%, rgba(226, 117, 58, .2), transparent 70%), var(--espresso);
}
/* hero label: a glass pill like the Work / About / Products badges, our copper flame avatar + "Blog" over a short line */
.bl-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 236, 220, .12); backdrop-filter: blur(8px);
}
.bl-badge__av { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, var(--amber), var(--copper)); box-shadow: 0 0 0 2px var(--espresso); }
.bl-badge__av img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.bl-badge__text { display: grid; gap: 1px; font-size: 12.5px; line-height: 1.25; color: var(--muted-dark); }
.bl-badge__text b { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.bl-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 40px clamp(40px, 6vw, 96px); }

/* the newest posts as a fanned stack of covers: the newest in front, the older two peeking out behind (darker, smaller,
   tilted); hovering the stack spreads them a little. Each card is the post's link; the words sit on a dark fade. */
.bl-stack { position: relative; aspect-ratio: 16 / 12; }
.bl-stack__card {
  position: absolute; width: 78%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 20px; color: var(--cream);
  background: var(--espresso-2); border: 1px solid rgba(255, 236, 220, .12); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  transition: transform .7s var(--ease), filter .5s;
}
.bl-stack__card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bl-stack__blank { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(70% 70% at 30% 20%, rgba(244, 168, 90, .35), transparent 70%), var(--espresso-3); }
.bl-stack__blank img { width: 40px; height: 40px; filter: brightness(0) invert(1); opacity: .6; }
.bl-stack__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 20, 17, 0) 35%, rgba(27, 20, 17, .92)); }
.bl-stack__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; gap: 6px; padding: 18px 20px 20px; }
.bl-stack__meta { font-size: 12px; color: rgba(247, 242, 235, .7); }
.bl-stack__meta b { margin-right: 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.bl-stack__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 clamp(17px, 1.5vw, 21px)/1.25 var(--display); letter-spacing: -.02em; }
.bl-stack__new { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 6px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--espresso); background: var(--cream); }
.bl-stack__card--0 { left: 0; bottom: 6%; z-index: 3; transform: rotate(-2.5deg); }
.bl-stack__card--1 { right: 0; top: 14%; z-index: 2; transform: rotate(3deg) scale(.9); filter: brightness(.62); }
.bl-stack__card--2 { left: 12%; top: 0; z-index: 1; transform: rotate(-6deg) scale(.8); filter: brightness(.42); }
.bl-stack__card--1 .bl-stack__body, .bl-stack__card--2 .bl-stack__body { display: none; }   /* the cards behind show only their picture */
.bl-stack:hover .bl-stack__card--0 { transform: rotate(0deg); }
.bl-stack:hover .bl-stack__card--1 { transform: rotate(5deg) scale(.9) translate(14px, -4px); filter: brightness(.8); }
.bl-stack:hover .bl-stack__card--2 { transform: rotate(-9deg) scale(.8) translate(-16px, -8px); filter: brightness(.6); }
.bl-stack__card--0:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.bl-stack__chip {   /* a glass note at the corner, like the Work hero's "All live" card */
  position: absolute; right: 0; bottom: 0; z-index: 4; display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px;
  border-radius: 16px; font-size: 12px; line-height: 1.25; color: var(--muted-dark);
  background: rgba(36, 26, 21, .82); border: 1px solid rgba(255, 236, 220, .14); backdrop-filter: blur(12px); box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .7);
}
.bl-stack__chip > span:last-child { display: grid; }
.bl-stack__chip b { font: 700 14px/1.25 var(--display); color: var(--cream); }
.bl-stack__chip-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 5px rgba(226, 117, 58, .2); }
.bl-hero__title { margin-top: 18px; font-family: var(--display); font-size: clamp(32px, 3.8vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -.045em; }   /* the About hero's type size (shared look on every inner hero) */
.bl-hero__title b { display: block; font-weight: inherit; color: var(--copper); }
.bl-hero__lead { max-width: 660px; margin-top: 22px; font-size: 18px; line-height: 1.65; color: rgba(247, 242, 235, .8); }
.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.bl-chips a {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: rgba(247, 242, 235, .85);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-dark); transition: border-color .25s, background .25s, color .25s;
}
.bl-chips a:hover { border-color: rgba(244, 168, 90, .45); color: var(--cream); }
.bl-chips a.is-on { color: var(--espresso); background: var(--cream); border-color: var(--cream); }

/* ---------- List ---------- */
.bl-list { padding-block: clamp(56px, 7vw, 100px) clamp(80px, 10vw, 130px); background: var(--paper); }
.bl-empty { font-size: 17px; color: var(--muted); }
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.bl-meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin-right: 14px; vertical-align: middle; border-radius: 50%; background: currentColor; opacity: .6; }
.bl-meta__cat { font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 11.5px; color: var(--copper); }
.bl-more { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); border-bottom: 1px solid rgba(29, 23, 18, .25); padding-bottom: 3px; transition: color .25s, border-color .25s; }
.bl-more span { display: inline-flex; transition: transform .25s var(--ease); }
.bl-more:hover { color: var(--copper); border-color: var(--copper); }
.bl-more:hover span { transform: translateX(3px); }

/* the newest post */
.bl-lead { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); overflow: hidden; border-radius: 24px; background: #fff; border: 1px solid var(--line); }
.bl-lead__cover { display: block; min-height: 340px; overflow: hidden; }
.bl-lead__cover img { width: 100%; height: 100%; object-fit: cover; }
.bl-lead__body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding: clamp(28px, 4vw, 52px); }
.bl-lead__title { font: 700 clamp(24px, 2.4vw, 34px)/1.15 var(--display); letter-spacing: -.035em; }
.bl-lead__title a, .bl-card__title a { transition: color .25s; }
.bl-lead__title a:hover, .bl-card__title a:hover { color: var(--copper); }
.bl-lead__text { font-size: 16px; line-height: 1.65; color: var(--muted); }

/* the others */
.bl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.bl-card { display: flex; flex-direction: column; gap: 12px; }
.bl-card__cover { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 20px; margin-bottom: 6px; border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s; }
.bl-card:hover .bl-card__cover { box-shadow: 0 26px 50px -30px rgba(90, 50, 20, .5); }
.bl-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.bl-card__title { font: 700 20px/1.25 var(--display); letter-spacing: -.025em; }
.bl-card__text { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* the drawn cover */
.bl-art {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; width: 100%; height: 100%; min-height: inherit;
  padding: clamp(22px, 3vw, 34px); color: var(--cream); overflow: hidden;
  background:
    radial-gradient(70% 80% at 100% 100%, rgba(226, 117, 58, .55), transparent 65%),
    radial-gradient(50% 60% at 0% 0%, rgba(244, 168, 90, .14), transparent 70%),
    var(--espresso);
}
.bl-art::after {   /* a faint dot grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 236, 220, .12) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(135deg, #000, transparent 70%); mask-image: linear-gradient(135deg, #000, transparent 70%);
}
.bl-art__cat { position: relative; z-index: 1; align-self: flex-start; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); background: rgba(244, 168, 90, .12); border: 1px solid rgba(244, 168, 90, .3); }
.bl-art__title { position: relative; z-index: 1; font: 700 clamp(20px, 2vw, 28px)/1.15 var(--display); letter-spacing: -.035em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bl-card .bl-art__title { font-size: 19px; -webkit-line-clamp: 3; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .bl-hero__grid { grid-template-columns: 1fr; }
  .bl-stack { max-width: 560px; width: 100%; }
  .bl-lead { grid-template-columns: 1fr; }
  .bl-lead__cover { min-height: 0; aspect-ratio: 16 / 9; }
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bl-stack { display: none; }   /* on phones the post list starts right under the hero, so the stack would only repeat it */
  .bl-hero { padding-top: 110px; }
  .bl-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-stack__card,   .bl-card__cover { transition: none; }
}
