/* ==========================================================================
   BLOG TEMPLATE, DRAFT. Loads after site.css and adds nothing to it.
   Every value here reads a token from site.css :root. No new colour, no new
   type stack, no new radius: the point of the template is that a post inherits
   the studio's design system instead of inventing a second one.

   Promote to production by folding these rules into site.css and deleting the
   extra <link>. Until then this file exists only under /blog/.
   ========================================================================== */

/* ---------------------------------------------------------------- draft bar */
/* The one element that must disappear before publish. It is also the honest
   label: a reader who lands here should know this is a template, not a post. */
.draft-bar{border-bottom:1px solid var(--color-border); background:var(--color-surface-subtle)}
.draft-bar .wrap{
  display:flex; flex-wrap:wrap; align-items:baseline;
  gap:var(--space-1) var(--space-4); padding-block:var(--space-3);
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--color-text-muted);
}
.draft-bar b{color:var(--color-text-primary); font-weight:500}
.draft-bar span + span::before{
  content:""; display:inline-block; vertical-align:middle;
  width:1px; height:9px; margin-right:var(--space-4);
  background:var(--color-control-border);
}

/* ----------------------------------------------------------------- post head */
.post-head{padding-block:var(--space-8) var(--space-6); border-bottom:1px solid var(--color-border)}
.post-kicker{
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--color-primary); font-weight:500;
}
.post-head h1{
  margin-top:var(--space-3);
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(30px,4.2vw,54px); line-height:1; letter-spacing:-.024em;
  max-width:24ch;
}
.post-standfirst{
  margin-top:var(--space-4); max-width:var(--measure);
  font-size:17.5px; line-height:1.5; color:var(--color-text-secondary);
}
.post-meta{
  margin-top:var(--space-5);
  display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2) var(--space-5);
  font-family:var(--font-mono); font-size:11px; letter-spacing:.06em;
  color:var(--color-text-muted);
}
.post-meta .state::before{vertical-align:-1px}
.post-meta time{letter-spacing:.04em}

/* --------------------------------------------------- the body, three columns
   Text keeps the 660px measure. An image can ask for the wider column
   (`.outset`) or the whole page (`.wide`) without a negative margin, which is
   what keeps a template page from producing a horizontal scrollbar. */
.post-body{padding-block:var(--space-7)}
.post-body{
  display:grid; grid-template-columns:minmax(0,1fr);
  row-gap:var(--space-6);
}
@media (min-width:760px){
  .post-body{grid-template-columns:1fr minmax(0,var(--measure)) 1fr; column-gap:var(--space-5)}
  .post-body > *{grid-column:2}
  .post-body > .outset{grid-column:1 / -1; width:min(880px,100%); justify-self:center}
  .post-body > .wide{grid-column:1 / -1; width:min(1120px,100%); justify-self:center}
}
.post-body .prose::after{content:""; display:block; clear:both}
.post-body .prose h2, .post-body .prose h3{clear:both}

/* --------------------------------------------------------------------- shots
   One box, six crops. The placeholder SVGs are the size each slot wants, so
   dropping a real photograph in is an <img src> swap and nothing else. */
.fig{margin:0}
.shot{
  display:block; overflow:hidden;
  border:1px solid var(--color-border);
  background:var(--color-surface-subtle);
}
.shot img{display:block; width:100%; height:100%; object-fit:cover}
.r-16x9{aspect-ratio:16 / 9}
.r-4x3{aspect-ratio:4 / 3}
.r-1x1{aspect-ratio:1 / 1}
.r-4x5{aspect-ratio:4 / 5}
.r-2x3{aspect-ratio:2 / 3}
.r-7x3{aspect-ratio:7 / 3}
.fig figcaption{
  margin-top:var(--space-2);
  font-family:var(--font-mono); font-size:11px; letter-spacing:.02em; line-height:1.5;
  color:var(--color-text-muted);
}
.fig figcaption b{font-weight:500; color:var(--color-text-secondary)}

/* POSITION 1: lead image, under the title, at the measure.
   POSITION 2: `.wide`, the full-page break mid-article.
   POSITION 3: `.outset`, wider than the measure but short of the page. */
.fig--lead{margin-bottom:var(--space-2)}

/* POSITION 4 and 5: floated left and right, text wraps around them.
   Below 640px a float is a small image with text squeezed beside it, so it
   becomes a plain block instead. */
@media (min-width:640px){
  .fig--right{float:right; width:min(44%,264px); margin:var(--space-1) 0 var(--space-5) var(--space-5)}
  .fig--left{float:left; width:min(44%,264px); margin:var(--space-1) var(--space-5) var(--space-5) 0}
}

/* POSITION 6: a small centred figure inside the measure. */
.fig--inline{width:min(100%,420px); margin-inline:auto}

/* POSITION 7: two images, one caption each, side by side. */
.fig--pair{display:grid; grid-template-columns:1fr; gap:var(--space-5)}
@media (min-width:560px){.fig--pair{grid-template-columns:1fr 1fr; gap:var(--space-4)}}

/* POSITION 8: a gallery strip. Two across on a phone, three above 640px. */
.fig--strip{display:grid; grid-template-columns:1fr 1fr; gap:var(--space-3)}
@media (min-width:640px){.fig--strip{grid-template-columns:repeat(3,1fr)}}
.fig--strip figcaption{grid-column:1 / -1}

/* POSITION 9: image beside text, image pinned while the text scrolls.
   The figure column has to be as tall as the text column for a sticky child to have
   anywhere to travel, so the grid keeps its default stretch and the figure is the
   sticky box. `align-items:start` here was the bug: it sized the column to the image,
   so the pin had zero travel and the plate just scrolled away. */
.split{display:grid; gap:var(--space-5); grid-template-columns:minmax(0,1fr)}
.split > .split-figure{align-self:stretch}
@media (min-width:820px){
  .split{grid-template-columns:minmax(0,300px) minmax(0,1fr); gap:var(--space-6)}
  .split--flip{grid-template-columns:minmax(0,1fr) minmax(0,300px)}
  .split--flip > .split-figure{order:2}
  .split > .split-figure .fig{position:sticky; top:var(--space-9)}
}
.split h3{margin-top:0}
.split p{margin-top:var(--space-3); font-size:15px; line-height:1.62; color:var(--color-text-secondary)}
.split p:first-child{margin-top:0}

/* CAPTION POSITIONS. Below is the default; these two are the alternatives. */
.fig--caption-top figcaption{margin-top:0; margin-bottom:var(--space-2)}
@media (min-width:560px){
  .fig--caption-side{display:grid; grid-template-columns:minmax(0,1fr) 200px; gap:var(--space-4); align-items:end}
  .fig--caption-side figcaption{margin-top:0; padding-bottom:var(--space-1)}
}

/* --------------------------------------------------------------------- tags
   No pills: the design contract bans badge shapes. A tag here is mono text
   with the same hairline underline a link already carries. */
.tags{margin-top:var(--space-6); display:flex; flex-wrap:wrap; gap:var(--space-2) var(--space-4)}
.tags li{font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; color:var(--color-text-muted)}
.tags a{border-bottom:1px solid var(--color-control-border); padding-block:var(--space-1); transition:color var(--motion-enter) var(--ease), border-color var(--motion-enter) var(--ease)}
.tags a:hover{color:var(--color-primary); border-color:var(--color-primary)}

/* -------------------------------------------------- prev / next, hairline rows */
.post-jump{margin-top:var(--space-6); border-top:1px solid var(--color-text-primary)}
@media (min-width:700px){.post-jump{display:grid; grid-template-columns:1fr 1fr; column-gap:var(--space-6)}}
.post-jump a{
  display:block; padding-block:var(--space-4);
  border-top:1px solid var(--color-border);
  transition:color var(--motion-enter) var(--ease);
}
@media (min-width:700px){.post-jump a{border-top:0}}
.post-jump a:first-child{border-top:0}
@media (min-width:700px){
  .post-jump a + a{border-left:1px solid var(--color-border); padding-left:var(--space-6)}
}
.post-jump .dir{
  display:block; font-family:var(--font-mono); font-size:10px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--color-text-muted); margin-bottom:var(--space-2);
}
.post-jump .to{font-family:var(--font-display); font-weight:600; font-size:17px; letter-spacing:-.01em}
.post-jump a:hover .to{color:var(--color-primary)}

/* ---------------------------------------------------------------- the listing
   Hairline rows, the same discipline as the product list on the home page:
   date, title, summary, state. No cards. `.post-row--thumb` is the optional
   variant with a plate on the left. */
.posts{border-bottom:1px solid var(--color-border)}
.post-row{
  display:grid; gap:var(--space-2);
  padding-block:var(--space-5);
  border-top:1px solid var(--color-border);
  transition:background var(--motion-exit) var(--ease);
}
.post-row:first-child{border-top:1px solid var(--color-text-primary)}
@media (hover:hover){.post-row:hover{background:var(--color-surface); transition-duration:var(--motion-enter)}}
@media (min-width:820px){
  .post-row{grid-template-columns:132px minmax(0,1fr) 168px; column-gap:var(--space-5); align-items:baseline}
  .post-row--thumb{grid-template-columns:132px 128px minmax(0,1fr) 168px}
  .post-row--thumb .shot{grid-row:1 / span 2}
}
.post-date{font-family:var(--font-mono); font-size:11px; letter-spacing:.05em; color:var(--color-text-muted)}
.post-title{
  display:block; font-family:var(--font-display); font-weight:600;
  font-size:clamp(19px,2vw,23px); line-height:1.12; letter-spacing:-.014em;
  max-width:34ch; transition:color var(--motion-enter) var(--ease);
}
.post-row:hover .post-title{color:var(--color-primary)}
.post-sum{display:block; margin-top:var(--space-2); font-size:14.5px; line-height:1.55; color:var(--color-text-secondary); max-width:56ch}
.post-row-meta{display:flex; align-items:center; gap:var(--space-2)}
@media (min-width:820px){.post-row-meta{justify-content:flex-start}}
.post-go{font-family:var(--font-mono); font-size:11px; color:var(--color-primary)}
.row-tag{font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--color-text-muted)}

/* ------------------------------------------------------------- section head */
.list-head{
  display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between;
  gap:var(--space-2) var(--space-5); margin-bottom:var(--space-5);
}
.list-head .mono{margin:0}
.list-tools{display:flex; flex-wrap:wrap; gap:var(--space-4)}
.list-tools a{
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--color-text-muted); border-bottom:1px solid var(--color-control-border); padding-block:var(--space-1);
  transition:color var(--motion-enter) var(--ease), border-color var(--motion-enter) var(--ease);
}
.list-tools a:hover{color:var(--color-primary); border-color:var(--color-primary)}

/* A template page spends a paragraph explaining itself. That paragraph is
   styled as a note, not as body copy, so it cannot be mistaken for the post. */
.template-note{
  margin-top:var(--space-6); border-left:2px solid var(--color-primary);
  padding:var(--space-1) 0 var(--space-1) var(--space-4);
  max-width:var(--measure);
}
.template-note p{font-size:14.5px; line-height:1.6; color:var(--color-text-secondary)}
.template-note p + p{margin-top:var(--space-3)}
.template-note code{
  font-family:var(--font-mono); font-size:12.5px; color:var(--color-text-primary);
  background:var(--color-surface-subtle); padding:1px var(--space-1);
}

/* ==================================================================== landing
   The blog landing: an honest empty state, then ten card slots in a grid of
   mixed spans. The spans are the design: an even grid of equal cards is the
   thing DESIGN.md bans, so every row is composed rather than repeated. */

.intro{padding-block:var(--space-8) var(--space-6); border-bottom:1px solid var(--color-border)}
.intro h1{
  margin-top:var(--space-3);
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(30px,4.2vw,52px); line-height:1; letter-spacing:-.024em;
  max-width:20ch;
}
.intro .standfirst{
  margin-top:var(--space-4); max-width:var(--measure);
  font-size:17.5px; line-height:1.5; color:var(--color-text-secondary);
}
.intro .statusline{
  margin-top:var(--space-5); display:flex; flex-wrap:wrap; gap:var(--space-2) var(--space-5);
  font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; color:var(--color-text-muted);
}

/* The empty state. A hand-written paragraph, not a system message in a box:
   the page has nothing to show and says so in the studio's own words. */
.empty{
  margin-top:var(--space-6); max-width:var(--measure);
  border-left:2px solid var(--color-primary);
  padding:var(--space-1) 0 var(--space-1) var(--space-4);
}
.empty p{font-size:16px; line-height:1.6; color:var(--color-text-secondary)}
.empty p:first-child{font-size:17.5px; color:var(--color-text-primary)}
.empty p + p{margin-top:var(--space-3)}

/* --------------------------------------------------------------- the grid */
.slot-head{
  display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between;
  gap:var(--space-2) var(--space-5); margin-bottom:var(--space-5);
}
.slot-head .mono{margin:0}
.slot-head p.note{
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--color-text-muted);
}

.cards{
  display:grid; grid-template-columns:repeat(12,1fr);
  gap:var(--space-5) var(--space-5);
  align-items:stretch;
}
/* One column below 1000px, deliberately. A 6-column tablet grid cannot take a 12-column
   composition without leaving an orphan card with a hole beside it: 8+4 becomes 6+3 and the
   3 has nothing to pair with. A feed of full-width cards is honest; a grid with holes is not. */
@media (max-width:999px){.cards{grid-template-columns:minmax(0,1fr)}}

.card{
  display:flex; flex-direction:column;
  grid-column:span 12;
  border:1px solid var(--color-border);
  background:var(--color-surface);
  transition:border-color var(--motion-enter) var(--ease);
}
.c-4{grid-column:span 4}
.c-6{grid-column:span 6}
.c-8{grid-column:span 8}
.c-12{grid-column:span 12}
@media (max-width:999px){
  .c-4, .c-6, .c-8, .c-12{grid-column:span 1}
}

.card-media{
  overflow:hidden; background:var(--color-surface-subtle);
  border-bottom:1px solid var(--color-border);
}
.card-media img{display:block; width:100%; height:100%; object-fit:cover}
.card-body{
  padding:var(--space-4); display:flex; flex-direction:column; gap:var(--space-2); flex:1;
}
@media (min-width:768px){.card-body{padding:var(--space-5)}}

.card-kicker{
  font-family:var(--font-mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--color-text-muted);
}
.card-title{
  font-family:var(--font-display); font-weight:600;
  font-size:clamp(17px,1.6vw,20px); line-height:1.16; letter-spacing:-.014em;
  transition:color var(--motion-enter) var(--ease);
}
.c-8 .card-title, .c-12 .card-title{font-size:clamp(20px,2.4vw,28px); letter-spacing:-.018em}
.card-sum{font-size:14.5px; line-height:1.55; color:var(--color-text-secondary)}
.card-foot{
  margin-top:auto; padding-top:var(--space-3);
  display:flex; align-items:baseline; justify-content:space-between; gap:var(--space-3);
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.08em;
  color:var(--color-text-muted); text-transform:uppercase;
}
.card-foot .go{color:var(--color-primary)}

/* A linked card is a real post. An unlinked one is a slot waiting for one, and
   it must not fake a hover state it cannot honour. */
a.card:hover{border-color:var(--color-control-border)}
a.card:hover .card-title{color:var(--color-primary)}
a.card:focus-visible{outline:2px solid var(--color-focus-ring); outline-offset:3px}

/* Wide card: media beside the text, so the grid gets one horizontal rhythm
   among the vertical ones. Stacks on a phone like everything else. */
@media (min-width:620px){
  .card--row{flex-direction:row; align-items:stretch}
  .card--row .card-media{
    flex:0 0 42%; border-bottom:0; border-right:1px solid var(--color-border);
  }
  .card--row .card-body{justify-content:center}
}
/* Text-only card: no image, so it carries the argument by type and a hairline. */
.card--text{background:var(--color-page)}
.card--text .card-body{padding-block:var(--space-5)}

/* =================================================================== pager
   Static pagination: one directory per page, because the site has no build
   step and no server to page a query. Numbers are targets, not decoration, so
   each holds a 36px box even though the type is 12px. */
.pager{
  margin-top:var(--space-8); padding-top:var(--space-5);
  border-top:1px solid var(--color-text-primary);
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between;
  gap:var(--space-4) var(--space-6);
}
.pager-count{
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--color-text-muted);
}
.pager-list{display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-1); list-style:none}
.pager-list a, .pager-list .gap{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:36px; min-height:36px; padding-inline:var(--space-2);
  font-family:var(--font-mono); font-size:12px; letter-spacing:.02em;
  color:var(--color-text-secondary);
  border-bottom:1px solid transparent;
  transition:color var(--motion-enter) var(--ease), border-color var(--motion-enter) var(--ease);
}
.pager-list a:hover{color:var(--color-primary); border-color:var(--color-primary)}
.pager-list [aria-current="page"]{
  color:var(--color-text-primary); font-weight:500;
  border-color:var(--color-text-primary);
}
.pager-list .gap{color:var(--color-text-muted); min-width:var(--space-4)}
.pager-step{
  font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase;
}
.pager-step a{
  display:inline-block; padding-block:var(--space-2);
  color:var(--color-primary); border-bottom:1px solid var(--color-control-border);
  transition:color var(--motion-enter) var(--ease), border-color var(--motion-enter) var(--ease);
}
.pager-step a:hover{border-color:var(--color-primary)}
.pager-step .off{color:var(--color-text-muted)}
@media (max-width:619px){
  .pager{justify-content:flex-start}
  .pager-count{order:3; width:100%}
}
.pager-step a + a{margin-left:var(--space-4)}
