/* =========================================================
   Teardowns / Insights listing: Figma Dev Handoff › Teardowns (1092:21917)
   Also provides the featured hero + Insight Card used on article pages.
   1440 base · ≥1680 (1920 frame) · ≤1199 (834 frame) · ≤699 (390 frame)
   ========================================================= */

/* ---------- Top: header + featured hero ---------- */
.td-top { display: flex; flex-direction: column; align-items: center; gap: 48px; padding: 40px; }
.feat {
  --grain: .15;
  position: relative; overflow: hidden; width: 100%; height: 547px;
  display: flex; flex-direction: column; align-items: center;
  padding: 40px; border-radius: 24px;
  background: linear-gradient(180deg, var(--blue-900), var(--blue-700));
}
.feat__copy { position: relative; z-index: 2; width: 789px; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.feat__eyebrow { font-size: 20px; line-height: 1.5; color: rgba(219, 209, 184, .7); }
.feat__title { width: 100%; font-size: 48px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.feat__text { font-size: 16px; font-weight: 500; line-height: 1.5; color: rgba(219, 209, 184, .7); }
.feat__img { position: absolute; z-index: 1; left: 50%; top: 343px; width: 1506px; height: 587px; max-width: none; transform: translateX(-50%); object-fit: cover; pointer-events: none; }
/* Article painting strip: spans the card's lower part; the top dissolves into the blue so the painting reads as part
   of the card (no colour change, just a mask). Featured slides crossfade between their paintings. */
.feat .feat__img.feat__img--painting {
  left: 0; right: 0; top: auto; bottom: 0; width: 100%; height: var(--paint-h, 70%); max-width: none; transform: none;
  object-fit: cover; object-position: 50% 42%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .22) 26%, rgba(0, 0, 0, .75) 58%, #000 86%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .22) 26%, rgba(0, 0, 0, .75) 58%, #000 86%);
}
.feat .feat__img.feat__img--thumb { object-position: 50% 45%; }
.feat .feat__img[data-feat-img] { opacity: 0; transition: opacity .6s var(--ease); }
.feat .feat__img[data-feat-img].is-on { opacity: 1; }
.feat__slide { position: relative; z-index: 2; width: 100%; display: flex; justify-content: center; }
.feat__slide[hidden] { display: none; }
.feat__arrow {
  position: absolute; z-index: 3; top: 42%; width: 48px; height: 48px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(12, 38, 95, .45); box-shadow: inset 0 0 0 1px rgba(221, 211, 185, .45);
  transition: background .25s var(--ease);
}
.feat__arrow:hover { background: rgba(14, 72, 135, .8); }
.feat__arrow--prev { left: 24px; }
.feat__arrow--next { right: 24px; }
.feat__arrow img { width: 16px; height: 16px; }

/* ---------- List: tools, grid, view more ---------- */
.td-list { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 40px 80px; }
.td-tools { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.td-select, .td-search {
  position: relative; display: flex; align-items: center;
  background: #fff8e8; border-radius: 14px; box-shadow: inset 0 0 0 1px #d0d0bd;
  font-size: 16px; font-weight: 500; line-height: 1; letter-spacing: -.04em;
}
.td-select { width: 221px; height: 48px; }
.td-select select {
  width: 100%; height: 100%; padding: 0 48px 0 20px; border: 0; border-radius: 14px;
  background: transparent; color: #3f3f46; font: inherit; letter-spacing: inherit;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.td-select img { position: absolute; right: 12px; top: 50%; margin-top: -12px; pointer-events: none; }
.td-search { width: 331px; height: 56px; padding: 0 20px; gap: 10px; }
.td-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
  color: #3f3f46; font: inherit; letter-spacing: inherit;
}
.td-search input::placeholder { color: rgba(82, 82, 64, .7); opacity: 1; }
.td-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.td-select:focus-within, .td-search:focus-within { box-shadow: inset 0 0 0 1px #d0d0bd, 0 0 0 2px var(--blue-700); }
.td-select select:focus-visible, .td-search input:focus-visible { outline: none; }

.td-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 28px; }
.td-grid > .card[hidden] { display: none; }
.td-empty { font-size: 16px; color: rgba(32, 30, 20, .7); }
.td-more[hidden] { display: none; }

/* ---------- Insight card (Figma: Content / Insight Card 844:341) ---------- */
.card {
  position: relative; display: flex; align-items: stretch; gap: 32px; overflow: hidden;
  padding: 24px; border-radius: 12px;
  background: #fff8e8; box-shadow: inset 0 0 0 1px #d0d0bd;
}
.card__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.card__head { display: flex; flex-direction: column; gap: 8px; width: 100%; line-height: 24px; letter-spacing: -.04em; }
.card__cat { font-size: 16px; color: var(--blue-700); }
.card__title { font-size: 20px; font-weight: 500; line-height: 24px; color: #18181b; }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card__text {
  min-height: 4lh; margin-bottom: 1lh; /* Figma reserves 5 lines and shows at most 4 */
  font-size: 16px; font-weight: 500; line-height: 1.5; color: rgba(32, 30, 20, .7);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}
.card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; line-height: 1.5; color: rgba(32, 30, 20, .5); white-space: nowrap; }
.card__meta i { width: 4px; height: 4px; border-radius: 50%; background: rgba(32, 30, 20, .5); }
.card__more { display: flex; align-items: center; gap: 4px; font-size: 20px; font-weight: 500; line-height: 1.5; color: var(--blue-700); }
.card__more img { margin: 4px; transition: transform .35s var(--ease-out); }
.card__img { flex: 1 1 0; min-width: 0; position: relative; border-radius: 8px; overflow: hidden; background: var(--sand); }
.card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.card:hover .card__img img { transform: scale(1.04); }
.card:hover .card__more img { transform: translate(2px, -2px); }
.card:focus-within { box-shadow: inset 0 0 0 1px #d0d0bd, 0 0 0 2px var(--blue-700); }
.card__title a:focus-visible { outline: none; }

/* cards appearing after "View more" */
@media (prefers-reduced-motion: no-preference) {
  .card.is-new { animation: card-in .7s var(--ease-out) both; }
  @keyframes card-in { from { opacity: 0; transform: translateY(24px); } }
}

/* =========================================================
   ≥1680 · Desktop 1920 frame
   ========================================================= */
@media (min-width: 1680px) {
  .td-top { padding: 40px 80px; }
  .feat { height: 655px; }
  .feat__copy { width: 896px; gap: 40px; }
  .feat__eyebrow, .feat__title { margin-bottom: -16px; }
  .feat__eyebrow { font-size: 24px; line-height: 30px; }
  .feat__title { font-size: 56px; }
  .feat__text { font-size: 20px; }
  .feat__btn, .td-more { font-size: 20px; }
  .feat__img { top: 394px; width: 1862px; height: 726px; }

  .card__text { font-size: 20px; margin-bottom: 0; } /* 120px box = exactly 4 lines at 20px */
  .card__meta { font-size: 14px; }
  .card__more { font-size: 24px; }
}

/* =========================================================
   ≤1199 · Tablet 834 frame
   ========================================================= */
@media (max-width: 1199px) {
  .td-top { padding: 40px; }
  .feat { height: 565px; }
  .feat__copy { width: 100%; }
  .feat__eyebrow { font-size: 16px; font-weight: 500; }
  .feat__title { font-size: 40px; line-height: 1.05; }
  .feat__text { font-weight: 400; }
  .feat__img { left: 0; top: 378px; width: 100%; height: 187px; transform: none; object-position: 50% 0; }
  /* Arrows sit on the eyebrow line, clear of the copy (client feedback: they covered the text) */
  .feat__arrow { top: 32px; width: 40px; height: 40px; }

  .td-list { padding: 40px; }
  .td-tools { align-items: stretch; }
  .td-select { height: 56px; }
  .td-grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  /* Figma groups the tablet cards in pairs: 24px inside a pair, 28px between pairs */
  .td-grid > .card:nth-child(2n+3) { margin-top: 4px; }
}

/* =========================================================
   ≤699 · Mobile 390 frame
   ========================================================= */
@media (max-width: 699px) {
  .td-top { padding: 40px 20px; gap: 24px; }
  .feat { height: 716px; padding: 20px; border-radius: 16px; }
  .feat__copy { gap: 24px; }
  .feat__eyebrow { font-weight: 400; }
  .feat__title { font-size: 32px; line-height: 1; }
  .feat__text { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
  .feat__btn { align-self: stretch; }
  .feat__img { left: -250px; top: 483px; width: 850px; height: 331px; }
  .feat__arrow { top: 12px; }
  .feat__arrow--prev { left: 12px; }
  .feat__arrow--next { right: 12px; }

  .td-list { padding: 40px 20px; gap: 24px; }
  .td-tools { flex-direction: column; gap: 12px; }
  .td-select { width: 100%; height: 48px; }
  .td-search { width: 100%; }
  .td-grid { row-gap: 12px; }
  .td-grid > .card:nth-child(2n+3) { margin-top: 0; }
  .td-more { align-self: stretch; }

  .card { flex-direction: column-reverse; justify-content: flex-end; gap: 32px; padding: 16px; }
  .card__img { flex: none; height: 265px; }
  .card__body { gap: 12px; }
  .card__head { line-height: 1.5; letter-spacing: 0; }
  .card__cat { font-size: 10px; font-weight: 500; }
  .card__title { font-size: 16px; line-height: 1.5; }
  .card__text { min-height: 3lh; margin-bottom: 0; font-size: 14px; font-weight: 400; -webkit-line-clamp: 3; }
  .card__meta { font-size: 10px; }
  .card__more { font-size: 16px; }
  .card__more img { margin: 4px; }
}
