/* =========================================================
   3KITS — Insights
   Big title, a search bar and an oversized category filter
   (counts beside each word), then the home page's insight cards.
   Loads after style3.css and reuses its tokens.
   ========================================================= */

/* ---------- Hero: title, search, categories ---------- */
.ins-hero { padding: calc(84px + clamp(32px, 5vw, 80px)) 0 clamp(15px, 0vw, 48px); }
.ins-hero__title { font-family: var(--display); font-weight: 600; font-size: clamp(56px, 8vw, 140px); line-height: 1; letter-spacing: 0; margin-bottom: clamp(24px, 3vw, 44px); }
.ins-hero__title .c { transform-origin: 50% 100%; }

.ins-search { position: relative; display: flex; align-items: center; gap: 14px; height: clamp(58px, 5vw, 80px); padding: 0 clamp(18px, 2vw, 30px); border-radius: 100px; border: 1px solid var(--line-2); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: border-color .4s, box-shadow .4s; }
.ins-search:focus-within { border-color: rgba(242, 117, 26, .6); box-shadow: 0 0 0 6px rgba(242, 117, 26, .08); }
.ins-search__icon { flex: none; width: 22px; height: 22px; color: var(--muted); }
.ins-search__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ins-search__input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: clamp(16px, 1.2vw, 19px); outline: none; }
.ins-search__input::placeholder { color: var(--dim); }
.ins-search__input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.ins-search__key { flex: none; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); font-family: var(--mono); font-size: 13px; color: var(--muted); transition: opacity .3s; }
.ins-search:focus-within .ins-search__key { opacity: 0; }

/* oversized topic words; the one in use is white, the rest dimmed; counts sit at the baseline */
.ins-search[hidden], .ins-cats[hidden] { display: none; }
.ins-cats { display: flex; flex-wrap: wrap; align-items: baseline; gap: clamp(6px, .6vw, 10px) clamp(18px, 2.2vw, 38px); margin-top: clamp(28px, 3.4vw, 56px); padding-top: clamp(28px, 1.4vw, 56px); border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent, var(--line-2) 30%, var(--line-2) 70%, transparent) 1; } /* top line fades at both ends, same as the Our Work client strip */
.ins-cat { position: relative; display: inline-flex; align-items: baseline; font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2vw, 34px); line-height: 1.2; letter-spacing: 0; color: rgba(238, 238, 246, .26); transition: color .4s; }
.ins-cat:hover { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ins-cat.is-on { color: var(--text); background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.ins-cat__n { position: relative; top: 0; margin-left: clamp(8px, .8vw, 14px); font-family: var(--mono); font-size: clamp(16px, 1.6vw, 26px); font-weight: 500; letter-spacing: 0; color: var(--muted); -webkit-text-fill-color: var(--muted); vertical-align: baseline; }
/* counts are kept in the markup (js/insights.js uses them to disable empty topics) but not shown */
.ins-cat__n { display: none; }
.ins-cat.is-on .ins-cat__n { color: var(--orange); -webkit-text-fill-color: var(--orange); }
.ins-cat[disabled] { cursor: default; opacity: .5; }

/* ---------- Articles ---------- */
.ins-list { padding-top: clamp(16px, 2vw, 32px); }
.ins-list__status { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: clamp(18px, 2vw, 28px); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.post.is-hidden { display: none; }
.post__cat { align-self: flex-start; margin-bottom: 12px; padding: 5px 12px; border-radius: 100px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); border: 1px solid rgba(242, 117, 26, .35); background: rgba(242, 117, 26, .06); }

/* one wide row per article: picture left (about 63%), details right; the site's "Read" cursor follows over it */
.ins-rows { display: flex; flex-direction: column; gap: clamp(36px, 3.6vw, 56px); }
.ins-row { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(28px, 3.6vw, 64px); align-items: start; }
.ins-row.is-hidden { display: none; }
.ins-row__img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #16161d; }
/* scroll reveal (js/insights.js): a panel the colour of the page covers the picture and shrinks down to its bottom edge;
   the text column fades in alongside */
.ins-rows.is-anim .ins-row__img::after { content: ""; position: absolute; inset: -1px; z-index: 1; background: var(--bg); transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.65, 0, .35, 1); }
.ins-rows.is-anim .ins-row.is-in .ins-row__img::after { transform: scaleY(0); }
.ins-rows.is-anim .ins-row__body { opacity: 0; transition: opacity .7s ease .2s; }
.ins-rows.is-anim .ins-row.is-in .ins-row__body { opacity: 1; }
.ins-row__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.ins-row:hover .ins-row__img img { transform: scale(1.04); }
.ins-row__body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.ins-row__cat { padding: 6px 18px; border-radius: 100px; background: rgba(255, 255, 255, .1); font-size: clamp(13px, 1vw, 16px); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; color: var(--text); }
/* article titles in the site heading style (display face, normal case, [words] in the gradient), one step below page headings */
.ins-row__title { --hue: var(--orange); margin-top: clamp(22px, 2.2vw, 36px); font-family: var(--display); font-weight: 600; font-size: clamp(24px, 2.3vw, 44px); line-height: 1.12; letter-spacing: 0; color: var(--text); text-wrap: balance; transition: color .4s; }
.ins-row:hover .ins-row__title { color: var(--orange); }
.ins-row__foot { align-self: stretch; display: flex; align-items: center; margin-top: clamp(32px, 3.4vw, 60px); padding-top: clamp(28px, 2.2vw, 38px); border-top: 1px solid var(--line); }
/* reading time, then the date */
.ins-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; font-size: clamp(14px, 1vw, 17px); text-transform: uppercase; color: var(--text); white-space: nowrap; }
.ins-row__meta time { color: var(--muted); }

@media (max-width: 900px) {
  .ins-row { grid-template-columns: 1fr; gap: 22px; }
  .ins-row__title { margin-top: 18px; font-size: clamp(22px, 6vw, 30px); }
  .ins-row__foot { margin-top: 24px; padding-top: 20px; }
}

.ins-empty { display: grid; justify-items: start; gap: 18px; padding: clamp(32px, 5vw, 72px) 0; }
.ins-empty[hidden] { display: none; }
.ins-empty__title { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.6vw, 40px); letter-spacing: 0; }

/* ---------- Popular posts: a full-width row of round covers inside the grid ---------- */
.ins-pop { grid-column: 1 / -1; padding: clamp(32px, 4vw, 64px) 0 clamp(20px, 2.4vw, 36px); }
.ins-pop.is-hidden { display: none; }
.ins-pop__title { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 4vw, 64px); line-height: 1.05; letter-spacing: 0; margin-bottom: clamp(28px, 3.6vw, 60px); }
.ins-pop__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.ins-pop__item { position: relative; display: block; container-type: inline-size; }

/* gradient ring around the cover; on hover it spins and the cover zooms */
.ins-pop__ring { position: relative; display: block; aspect-ratio: 1; border-radius: 50%; padding: clamp(14px, 1.6vw, 24px); isolation: isolate; }
.ins-pop__ring::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; padding: 5px; background: conic-gradient(from 200deg, var(--blue), var(--pink), var(--orange), #f5c443, var(--blue)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; transition: transform 1.2s var(--ease); }
.ins-pop__item:hover .ins-pop__ring::before { transform: rotate(180deg); }
.ins-pop__img { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #111; }
.ins-pop__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; }
.ins-pop__item:hover .ins-pop__img img { transform: scale(1.08); filter: saturate(1.15); }

/* numbered badge overlapping the ring's lower left */
.ins-pop__num { position: absolute; left: 0; top: calc(78cqw - clamp(28px, 2.2vw, 40px)); display: grid; place-items: center; width: clamp(56px, 4.4vw, 80px); height: clamp(56px, 4.4vw, 80px); border-radius: 50%; background: var(--bg); border: 2px solid var(--orange); font-family: var(--display); font-weight: 500; font-size: clamp(22px, 1.9vw, 34px); color: var(--orange); transition: background .4s, color .4s; }
.ins-pop__item:hover .ins-pop__num { background: var(--orange); color: var(--bg); }
.ins-pop__item h3 { margin-top: clamp(28px, 3vw, 48px); font-family: var(--display); font-weight: 500; font-size: clamp(19px, 1.7vw, 30px); line-height: 1.22; letter-spacing: 0; transition: color .4s; }
.ins-pop__item:hover h3 { color: var(--orange); }
.ins-pop__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .01em; }

@media (max-width: 1100px) {
  .ins-pop__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
}
@media (max-width: 560px) {
  .ins-pop__list { grid-template-columns: 1fr; }
  .ins-pop__item { max-width: 360px; }
}

/* the post grid is the last section on Insights and on an article page: the footer's own top padding is the gap below */
main > section.insights:last-child { padding-bottom: 0; }


/* ---------- Insights: each article title takes a logo colour on hover ---------- */
/* blue, orange, pink, green, then it repeats (the grey of the logo is skipped) */
.ins-row:nth-of-type(4n+1) { --ins-hue: var(--blue); }
.ins-row:nth-of-type(4n+2) { --ins-hue: var(--orange); }
.ins-row:nth-of-type(4n+3) { --ins-hue: var(--pink); }
.ins-row:nth-of-type(4n+4) { --ins-hue: var(--green); }

/* when a topic or search hides some articles, the colours follow the articles still showing */
.ins-row:nth-child(4n+1 of .ins-row:not(.is-hidden)) { --ins-hue: var(--blue); }
.ins-row:nth-child(4n+2 of .ins-row:not(.is-hidden)) { --ins-hue: var(--orange); }
.ins-row:nth-child(4n+3 of .ins-row:not(.is-hidden)) { --ins-hue: var(--pink); }
.ins-row:nth-child(4n+4 of .ins-row:not(.is-hidden)) { --ins-hue: var(--green); }

.ins-row:hover .ins-row__title {
  color: var(--ins-hue, var(--orange));
}
/* ---------- the [bracketed] words of each title take the card's colour too ---------- */
.ins-row .ins-row__title {
  --hue: var(--ins-hue, var(--orange));
}

/* on hover the whole title turns the card's colour, the bracketed words included */
.ins-row:hover .ins-row__title .grad {
  background-image: none;
  color: inherit;
}