/* Plannix 2027, blog covers (Tratto, Campiture) and the home blog section. Sits on ../home-mood/home.css tokens (.site). */

/* Cover: no text on the card cover (8/10 tarda mattina, 4). Category tint, one object, one blue point; measures in cqi so the 284 px card and the 1200 px OG share one template. */
.bl-cover { position: relative; container-type: inline-size; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r, 10px); background: var(--f); isolation: isolate; }
.bl-cover.bl-og { aspect-ratio: 1200 / 630; border-radius: 0; }
.bl-obj { position: absolute; left: 50%; top: 50%; width: 70cqi; height: 56cqi; transform: translate(-50%, -48%); overflow: visible; }
.bl-defs { display: none; }
/* Card covers never show words: hides the labels of markup generated before 8/10 until home-work regenerates it */
.bl-cover:not(.bl-og) :is(.bl-c-t, .bl-c-cat, .bl-c-n) { display: none; }

/* C, Tratto: one navy line weight, open shapes on paper, no hatching, no construction lines */
.bl-c .bl-obj .s { fill: #ffffff; stroke: #02376c; stroke-width: max(1.25px, 0.42cqi); stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bl-c .bl-obj path.s:not([d$="Z"]) { fill: none; }
.bl-obj .pt { fill: #027dfa; }

/* A, Campiture: the same shapes as flat blocks in the logo's blues, no outlines */
.bl-a .f-n { fill: #02376c; }
.bl-a .f-b { fill: #1b49c2; }
.bl-a .f-s { fill: #0373e2; }
.bl-a .f-a { fill: #62cefe; }
.bl-a .f-w { fill: #ffffff; }
.bl-a .ln { fill: none; stroke-width: max(1.25px, 0.42cqi); stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bl-a .ln-ink { stroke: #02376c; }
.bl-a .ln-paper { stroke: #ffffff; }
.bl-a .pt { fill: #027dfa; }

/* OG 1200 x 630: the only cover with words. Title and logo on the left, object on the right */
.bl-og .bl-obj { left: auto; right: 4cqi; top: 50%; width: 46cqi; height: 40cqi; transform: translateY(-50%); }
.bl-og-side { position: absolute; left: 6cqi; top: 6cqi; bottom: 6cqi; width: 42cqi; display: flex; flex-direction: column; color: #02376c; }
.bl-og-side .bl-c-cat { font: 500 2.2cqi/1.2 var(--sans); opacity: 0.8; }
.bl-og-side .bl-c-t { margin-top: 2.4cqi; font-family: var(--serif); font-weight: 400; font-size: 5.6cqi; line-height: 1.1; padding-bottom: 0.1em; letter-spacing: -0.015em; text-wrap: balance; }
.bl-og-side .bl-c-t[data-len="xl"] { font-size: 9cqi; line-height: 1.02; }
.bl-og-side .bl-c-t[data-len="l"] { font-size: 4.8cqi; }
.bl-og-side .bl-logo { margin-top: auto; width: auto; height: 3.4cqi; align-self: flex-start; }

/* Card and the home section */
.bl-card { position: relative; display: grid; gap: 14px; align-content: start; height: 100%; color: inherit; text-decoration: none; border-radius: calc(var(--r, 10px) + 4px); outline-offset: 4px; }
.bl-card:focus-visible { outline: 2px solid var(--brand); }
.bl-meta { display: grid; gap: 6px; }
.bl-cat { font-size: var(--fs-xs, 13px); color: var(--ink-3); }
.bl-t { margin: 0; font-family: var(--serif); font-weight: 400; font-size: calc(20px * var(--ts, 1)); line-height: 1.25; letter-spacing: -0.01em; color: var(--fg); text-wrap: pretty; }
.bl-by { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: var(--fs-xs, 13px); color: var(--ink-3); }
.bl-by span { color: var(--ink-2); }
.bl-cover .bl-obj { transition: transform 320ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .bl-card:hover .bl-t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  .bl-card:hover .bl-obj { transform: translate(-50%, -48%) translateY(-1.2cqi); }
}
.bl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bl-home-h { margin-bottom: clamp(28px, 3.4vw, 44px); }
.bl-paths { display: grid; gap: clamp(48px, 6vw, 72px); }
.bl-path-t { margin: 0; font: 500 var(--fs-lead, 18px)/1.3 var(--sans); letter-spacing: 0; color: var(--fg); }
/* Each path: title and its links on one line, cards below; the DOM order (title, cards, links) is the mobile order */
.bl-path { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h links" "cards cards"; align-items: end; row-gap: clamp(20px, 2.6vw, 32px); column-gap: 32px; }
.bl-path-t { grid-area: h; }
.bl-path > .bl-cards { grid-area: cards; }
.bl-links { grid-area: links; display: flex; flex-wrap: wrap; gap: 0 24px; margin-bottom: -10px; }
.bl-more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--fs-sm, 14px); font-weight: 500; color: var(--brand); text-decoration: none; }
.bl-more svg { width: 14px; height: 14px; flex: none; }
@media (hover: hover) and (pointer: fine) { .bl-more:hover { text-decoration: underline; text-underline-offset: 3px; } }
.bl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.bl-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bl-cards-2 .bl-t { font-size: calc(22px * var(--ts, 1)); }

/* Under 760 px the three cards become a native scroll-snap row; the next card peeks so the row reads as swipeable */
@media (max-width: 760px) {
  .bl-path { grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "cards" "links"; row-gap: 20px; }
  .bl-links { flex-direction: column; margin: -4px 0 0; }
  .bl-cards-2 { grid-template-columns: none; }
  .bl-cards-2 .bl-t { font-size: 18px; }
  .bl-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scrollbar-width: none; }
  .bl-cards::-webkit-scrollbar { display: none; }
  .bl-cards > li { scroll-snap-align: start; }
  .bl-t { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .bl-cover .bl-obj { transition: none; } }

/* Board (work page only: these classes do not ship) */
.bl-board { padding-block: 40px 24px; }
.bl-board-h { display: grid; gap: 8px; max-width: 46rem; }
.bl-board-h p { color: var(--ink-2); }
.bl-toc { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 12px; }
.bl-toc a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-sm); color: var(--brand); text-decoration: none; }
.bl-sys { padding-block: 56px; border-top: 1px solid var(--line); }
.bl-sys-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 48px; align-items: end; margin-bottom: 28px; }
.bl-sys-h .h2 { font-size: clamp(26px, 3vw, 34px); }
.bl-tag { display: inline-flex; align-self: start; justify-self: start; margin-bottom: 6px; padding: 3px 8px; border-radius: 6px; background: #e3eefc; color: #0262c2; font-size: 13px; font-weight: 500; }
.bl-rule { font-size: var(--fs-sm); color: var(--ink-2); max-width: 36em; }
.bl-refs { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.bl-refs a { color: inherit; }
.bl-sub { margin: 32px 0 14px; font: 500 var(--fs-sm)/1.3 var(--sans); color: var(--ink-2); }
.bl-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, 320px); gap: 16px; justify-content: start; }
.bl-cat-grid figure { display: grid; gap: 8px; width: 320px; }
.bl-cat-grid figcaption { font-size: var(--fs-xs); color: var(--ink-3); }
.bl-og-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.bl-og-row a { display: block; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.bl-og-row img { width: 100%; height: auto; }
.bl-now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bl-now img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.bl-now figcaption { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.bl-play { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.bl-form { display: grid; gap: 14px; }
.bl-form label { display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.bl-form :is(input, select, textarea) { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #ffffff; color: var(--fg); font: 400 16px/1.3 var(--sans); }
.bl-form textarea { resize: vertical; min-height: 72px; }
.bl-play-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bl-play-out figure { display: grid; gap: 6px; }
.bl-play-out figcaption { font-size: var(--fs-xs); color: var(--ink-3); }
@media (max-width: 860px) {
  .bl-sys-h, .bl-play { grid-template-columns: minmax(0, 1fr); }
  .bl-now { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .bl-board .bl-cards { grid-auto-columns: 80%; }
  .bl-cat-grid { grid-template-columns: minmax(0, 320px); }
  .bl-cat-grid figure { width: 100%; max-width: 320px; }
  .bl-play-out { grid-template-columns: minmax(0, 1fr); }
}
/* The home's A/C switch (home.css, data-cover) hides one system; the board shows them all */
.site[data-board] .bl-cover.bl-a, .site[data-board] .bl-cover.bl-c { display: block; }
.site[data-board] .bl-home .bl-path { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "h links" "cards cards"; }
@media (max-width: 760px) { .site[data-board] .bl-home .bl-path { grid-template-columns: minmax(0, 1fr); grid-template-areas: "h" "cards" "links"; } }
