/* ==========================================================================
   TechAbbot – insights and perspectives
   Markup: partials/insights.html (generated by tools/build-insights.js)
   No script.

   White, editorial section: one large featured article and two smaller
   supporting articles, set off by rules rather than boxed into cards.

     below 640px     stacked; supporting articles as small thumbnail + text
     640px and up    featured article, then the two supporting ones side by side
     1024px and up   featured article on the left, supporting ones stacked
                     on the right
   ========================================================================== */

.insights {
  padding-block: clamp(52px, 6.5vw, 96px);
  background: var(--c-bg);
}

/* Heading row ------------------------------------------------------------- */

.insights__head {
  display: grid;
  gap: 22px;
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 2px solid var(--c-text);
}

.insights__label::after { content: none; }

.insights__title {
  max-width: 20em;
  margin: 14px 0 0;
  font-size: clamp(1.75rem, 1.25rem + 2.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.insights__accent { color: var(--c-blue); }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .insights__accent {
    background: var(--gradient-logo);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    -webkit-text-fill-color: transparent;
  }
}

.insights__intro {
  max-width: 46em;
  margin: 16px 0 0;
  color: var(--c-text-muted);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
}

.insights__all { justify-self: start; }

/* Articles ------------------------------------------------------------------ */

.insights__grid {
  display: grid;
  gap: clamp(28px, 3.4vw, 48px);
  margin-top: clamp(26px, 3.2vw, 40px);
}

.insight { min-width: 0; }

.insight__media {
  border-radius: 14px;
  background: var(--c-bg-alt);
  overflow: hidden;
}

.insight__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.insight:hover .insight__media img { transform: scale(1.03); }

.insight__category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--c-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.insight__category::before {
  content: "";
  flex: none;
  width: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-green), #0871A7);
}

.insight__title {
  margin: 10px 0 0;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.insight__title a {
  color: var(--c-text);
  text-decoration: none;
  background: linear-gradient(90deg, var(--c-green), #0871A7) left bottom / 0 2px no-repeat;
  transition: background-size 260ms ease, color var(--ease);
}

.insight__title a:hover {
  color: var(--c-blue);
  background-size: 100% 2px;
}

.insight__excerpt {
  margin: 10px 0 0;
  color: var(--c-text-muted);
  line-height: 1.6;
}

.insight__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 12px 0 0;
  color: var(--c-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.insight__meta > * + *::before {
  content: "\00B7";
  margin-inline: 8px;
}

.insight__more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  color: var(--c-blue);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.insight__more::after {
  content: "\2192";
  margin-left: 8px;
  transition: transform var(--ease);
}

.insight__more:hover { text-decoration: underline; text-underline-offset: 4px; }
.insight__more:hover::after,
.insight__more:focus-visible::after { transform: translateX(4px); }

/* Featured */

.insight--featured .insight__media { aspect-ratio: 16 / 9; }

.insight--featured .insight__body { margin-top: 20px; }

.insight--featured .insight__title { font-size: clamp(1.375rem, 1.1rem + 1.3vw, 2rem); }

.insight--featured .insight__excerpt { font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem); }

/* Supporting: small thumbnail beside the text, ruled apart. */

.insights__side {
  display: grid;
  align-content: start;
  gap: 24px;
}

.insights__side .insight {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.insights__side .insight + .insight {
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}

.insights__side .insight__media { aspect-ratio: 4 / 3; }

/* Squarer covers are title graphics: keep their top-left, where the title sits. */
.insights__side .insight__img--tall { object-position: left top; }

.insights__side .insight__title { font-size: 1.0625rem; }

.insights__side .insight__excerpt {
  font-size: 0.9375rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Layout ------------------------------------------------------------------ */

@media (min-width: 640px) {
  .insights__side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 36px);
    padding-top: clamp(24px, 3vw, 36px);
    border-top: 1px solid var(--c-border);
  }

  .insights__side .insight {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .insights__side .insight + .insight {
    padding-top: 0;
    border-top: 0;
  }

  .insights__side .insight__media { aspect-ratio: 16 / 9; }
}

@media (min-width: 900px) {
  .insights__head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 40px;
  }

  .insights__all { justify-self: end; }
}

@media (min-width: 1024px) {
  .insights__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

  .insights__side {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 0 0 0 clamp(28px, 3.4vw, 48px);
    border-top: 0;
    border-left: 1px solid var(--c-border);
  }

  .insights__side .insight {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 18px;
  }

  .insights__side .insight + .insight {
    padding-top: 28px;
    border-top: 1px solid var(--c-border);
  }

  .insights__side .insight__media { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  .insight__media img,
  .insight__more::after { transition: none; }

  .insight:hover .insight__media img { transform: none; }
}
