/* ==========================================================================
   Inkyy — Blog index (blog.html) + article template (blog-post.html)
   Builds on assets/css/style.css (tokens, .hero, .label, .btn, .link-arrow, .buddies-cta)
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero ---------- */
.page-hero { padding-bottom: clamp(48px, 6vw, 88px); }
.page-hero .hero__title { margin-top: 24px; }
.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px var(--gutter);
  align-items: end;
}
.blog-hero .hero__sub { margin: 0 0 10px; max-width: 40ch; }

/* ---------- Shared bits: filters, meta, author ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.filter:hover { color: var(--ink); box-shadow: inset 0 0 0 1px rgba(20, 20, 20, 0.3); }
.filter[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.filter:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.post-cat { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.post-cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

.author { display: inline-flex; align-items: center; gap: 12px; }
.author__img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.author__text { display: grid; gap: 2px; line-height: 1.3; }
.author__name { font-size: 15px; font-weight: 500; }
.author__role { font-size: 13px; color: var(--ink-3); }

/* ---------- Featured post ---------- */
.featured {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 4.4vw, 72px);
  align-items: center;
}
.featured__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.featured:hover .featured__media img { transform: scale(1.04); }
.featured__badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.featured__body { display: grid; gap: 22px; align-content: center; justify-items: start; }
.featured__title {
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.featured__excerpt { color: var(--ink-2); font-size: 17px; max-width: 44ch; text-wrap: pretty; }
.featured__cta { margin-top: 6px; }
.featured:hover .featured__cta { gap: 14px; }

/* ---------- Post list ---------- */
.blog-list { padding-top: clamp(80px, 9vw, 140px); }
.blog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px var(--gutter);
  padding-bottom: 28px;
  margin-bottom: clamp(36px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}
.blog-toolbar__title { font-size: clamp(26px, 2.4vw, 34px); font-weight: 400; letter-spacing: -0.03em; }

.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(48px, 5vw, 72px) clamp(16px, 2vw, 28px);
  transition: opacity 0.3s var(--ease), transform 0.5s var(--ease);
}
.posts.is-switching { opacity: 0; transform: translateY(12px); }
.post { display: grid; gap: 14px; align-content: start; }
.post[hidden] { display: none; }
.post__media {
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 8px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
/* renders shot on a white studio background: multiply lets the grey card show through */
.is-studio img { mix-blend-mode: multiply; }
.post:hover .post__media img { transform: scale(1.05); }
.post__title {
  font-size: clamp(21px, 1.7vw, 25px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
  width: fit-content;
}
.post:hover .post__title { background-size: 100% 1px; }
.post__excerpt { color: var(--ink-2); font-size: 15px; text-wrap: pretty; }
.post__date { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.posts-empty { padding: 48px 0; color: var(--ink-2); font-size: 18px; }
.posts-empty[hidden] { display: none; }

/* ---------- Newsletter ---------- */
.newsletter-wrap { padding-bottom: clamp(48px, 5vw, 80px); }
.newsletter {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: clamp(36px, 5vw, 72px);
  padding-right: clamp(220px, 24vw, 360px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
}
.newsletter__copy { display: grid; gap: 18px; }
.newsletter__copy .h2 { font-size: clamp(34px, 3.8vw, 54px); }
.newsletter__copy p { color: var(--ink-2); max-width: 40ch; }
.newsletter__form { display: grid; gap: 12px; width: min(100%, 460px); }
.newsletter__field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.3s;
}
.newsletter__field:focus-within { box-shadow: inset 0 0 0 1px var(--ink); }
.newsletter__field input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.newsletter__field input::placeholder { color: var(--ink-3); }
.newsletter__field .btn { height: 44px; --btn-bg: var(--ink); --btn-fg: #fff; }
.newsletter__note { min-height: 1.5em; padding-left: 22px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.newsletter__art {
  position: absolute;
  z-index: -1;
  right: clamp(60px, 9vw, 150px);
  bottom: 50%;
  width: clamp(220px, 22vw, 320px);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(150, 90, 0, 0.18));
  transform: translateY(50%) rotate(-10deg);
  transition: transform 1s var(--ease);
}
.newsletter:hover .newsletter__art { transform: translateY(46%) rotate(-4deg); }

/* ==========================================================================
   Article template
   ========================================================================== */
.read-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  background: var(--orange);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.article-head { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 88px)); }
.article-head__inner { display: grid; justify-items: center; text-align: center; }
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.crumbs a { transition: color 0.3s; }
.crumbs a:hover { color: var(--ink); }
.crumbs a:last-child { color: var(--ink); }
.article-head__title {
  margin-top: 28px;
  font-size: clamp(40px, 4.6vw, 68px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
/* split-line masks clip descenders at this tight line-height */
.article-head__title .line { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.article-head__deck { margin-top: 26px; max-width: 56ch; }
.article-head__meta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 28px;
}
.author .author__text { text-align: left; }
.article-head__facts { display: flex; gap: 18px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.article-head__facts > * + *::before { content: "·"; margin-right: 18px; }

.article-cover {
  margin: clamp(48px, 6vw, 80px) 0 0;
  aspect-ratio: 16 / 8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  justify-content: center;
  gap: clamp(40px, 7vw, 120px);
  padding-top: clamp(56px, 7vw, 104px);
}
.article-aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 40px; }
.toc__title { margin-bottom: 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--ink-3); }
.toc__list { display: grid; border-left: 1px solid var(--line); counter-reset: toc; }
.toc__list a {
  position: relative;
  display: block;
  padding: 7px 0 7px 18px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-3);
  transition: color 0.3s;
}
.toc__list a::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--ink);
  transform: scaleY(0);
  transition: transform 0.5s var(--ease);
}
.toc__list a:hover { color: var(--ink); }
.toc__list a.is-active { color: var(--ink); }
.toc__list a.is-active::before { transform: scaleY(1); }
.share__row { display: flex; gap: 8px; }
.share__btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.4s var(--ease);
}
.share__btn svg { width: 17px; height: 17px; }
.share__btn:hover { background: var(--ink); color: #fff; box-shadow: none; transform: translateY(-2px); }
.share__note { min-height: 1.5em; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* ---------- Long-form typography ---------- */
.prose { font-size: 19px; line-height: 1.68; color: #2b2b29; }
.prose > * + * { margin-top: 1.15em; }
.prose__lead { font-size: clamp(21px, 1.7vw, 24px); line-height: 1.5; letter-spacing: -0.012em; color: var(--ink); }
.prose h2 {
  margin-top: 2.4em;
  font-size: clamp(30px, 2.8vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h3 {
  margin-top: 1.9em;
  font-size: clamp(21px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.prose h2 + p, .prose h3 + p { margin-top: 0.7em; }
.prose a:not(.link-arrow) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(20, 20, 20, 0.3);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.3s;
}
.prose a:not(.link-arrow):hover { text-decoration-color: var(--orange); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { display: grid; gap: 0.6em; }
.prose ul li { position: relative; padding-left: 28px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.prose ol { counter-reset: item; }
.prose ol li { position: relative; padding-left: 44px; counter-increment: item; }
.prose ol li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.32em;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}
.pullquote { margin: 2.2em 0; padding: 0; position: relative; }
.pullquote p {
  font-size: clamp(28px, 2.7vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
.pullquote::before {
  content: "“";
  font-family: Georgia, serif;
  display: block;
  height: 0.5em;
  margin-bottom: 10px;
  font-size: 88px;
  line-height: 1;
  color: var(--orange);
}
.prose__figure { margin: 2.4em 0; }
.prose__figure img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.prose__figure.is-studio > span { display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.prose__figure figcaption { margin-top: 14px; font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.callout {
  margin: 2.4em 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.callout__title { margin-bottom: 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--ink-3); }
.callout ul { font-size: 17px; }

.author-box {
  margin-top: clamp(56px, 6vw, 88px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  font-size: 16px;
  line-height: 1.55;
}
.author-box__img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.author-box__body { display: grid; gap: 2px; justify-items: start; }
.author-box__label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--ink-3); }
.author-box__name { margin-top: 6px; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); }
.author-box__role { color: var(--ink-3); font-size: 14px; }
.author-box__bio { margin: 12px 0 16px; max-width: 52ch; color: var(--ink-2); }

/* ---------- Related ---------- */
.related { padding-bottom: 0; }
.related__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

/* ---------- Dark closing CTA (article) ---------- */
.post-cta-wrap { padding: clamp(96px, 10vw, 160px) 0 clamp(96px, 10vw, 150px); }
.post-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  min-height: clamp(400px, 34vw, 500px);
  border-radius: var(--radius-lg);
  background: #0e0e0e;   /* matches the black of the hill render */
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.post-cta__copy { display: grid; gap: 20px; padding: clamp(36px, 5vw, 72px); }
.post-cta__copy .h2 { font-size: clamp(34px, 3.5vw, 50px); }
.post-cta__copy p { color: rgba(255, 255, 255, 0.62); max-width: 40ch; }
.post-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.post-cta .btn--ghost { --btn-fg: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.post-cta .btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--accent-hover); }
.post-cta__art {
  align-self: stretch;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%);
  mask-image: linear-gradient(to right, transparent 0%, #000 22%);
}

/* ---------- Narrow screens (full mobile pass comes later) ---------- */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 720px); }
  .article-aside { position: static; order: 2; }
}
@media (max-width: 960px) {
  .blog-hero, .featured, .post-cta { grid-template-columns: 1fr; }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter { grid-template-columns: 1fr; padding-right: clamp(36px, 5vw, 72px); }
  .newsletter__art { opacity: 0.35; }
  .post-cta__art { -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); mask-image: linear-gradient(to bottom, transparent 0%, #000 22%); }
}
@media (max-width: 640px) {
  .posts { grid-template-columns: 1fr; }
  .newsletter__field { flex-wrap: wrap; padding: 6px; border-radius: 26px; }
  .newsletter__field input { padding-left: 16px; }
  .newsletter__field .btn { width: 100%; justify-content: center; }
}
