/*
 * =========================================================
 * OLYTIC SOLUTIONS - Insights Listing Page
 * insights.css
 *
 * Covers:
 *   - Insights hero (Navy bg, deliberate differentiation)
 *   - Featured post cards (3-up grid, fully clickable)
 *   - Flat "All insights" list (no dates, tags, or toggle)
 *
 * Requires: tokens.css, typography.css, layout.css
 * =========================================================
 */

/* ─── Insights Hero ─────────────────────────────────────── */

.insights-hero {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  position: relative;
}

.insights-hero__accent-rule {
  width: 48px;
  height: 2px;
  background-color: var(--color-gold);
  margin-bottom: var(--space-8);
}

.insights-hero__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-gold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-5);
}

.insights-hero__headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  color: #FFFFFF;
  margin-bottom: var(--space-5);
  max-width: 760px;
}

.insights-hero__sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.72);
  line-height: var(--leading-body);
  max-width: 620px;
  margin-bottom: 0;
}

.insights-hero__rule {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--color-gold) 20%,
    var(--color-gold) 80%,
    transparent 100%
  );
  opacity: 0.6;
}

/* ─── Featured Posts Section ─────────────────────────────── */

.insights-featured {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.insights-featured__heading {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-gold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

/* ─── Post Card (fully clickable) ────────────────────────── */

.insight-card {
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border: var(--border-default);
  border-top: 3px solid var(--color-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition-base),
              border-color var(--transition-fast),
              transform var(--transition-base);
}

.insight-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* Reused stock photography from the home page Explore carousel */
.insight-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--color-surface);
}

.insight-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.insight-card:hover .insight-card__media img {
  transform: scale(1.05);
}

.insight-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
  padding: var(--space-8);
}

/* Qualified with the card ancestor so this beats .section--dark h2/p
   (class+type specificity), which would otherwise paint this white
   card's text white-on-white since Featured now sits on a dark band. */
.insight-card .insight-card__title {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-obsidian);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  margin: 0;
}

.insight-card .insight-card__excerpt {
  font-size: var(--text-base);
  color: var(--color-body-steel);
  line-height: var(--leading-body);
  margin: 0;
  flex: 1;   /* absorbs extra height so the meta + Read row pins to the bottom */
}

/* Hairline divider above the card footer so meta + Read read as a footer band */
.insight-card__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  letter-spacing: var(--tracking-wide);
  padding-top: var(--space-5);
  border-top: var(--border-default);
}

.insight-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-teal);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.insight-card:hover .insight-card__link {
  color: var(--color-gold);
  gap: var(--space-3);
}

@media (prefers-reduced-motion: reduce) {
  .insight-card,
  .insight-card__media img {
    transition: none;
  }

  .insight-card:hover {
    transform: none;
  }

  .insight-card:hover .insight-card__media img {
    transform: none;
  }
}

/* ─── All Insights (flat list) ───────────────────────────── */

.insights-catalog {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.insights-catalog__heading {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-gold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.insights-catalog__list {
  display: flex;
  flex-direction: column;
}

.insights-catalog__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: #FFFFFF;
  transition: color var(--transition-fast);
}

.insights-catalog__row--last {
  border-bottom: none;
}

.insights-catalog__row-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.insights-catalog__row-arrow {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--text-sm);
  flex-shrink: 0;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.insights-catalog__row:hover {
  color: var(--color-gold);
}

.insights-catalog__row:hover .insights-catalog__row-arrow {
  transform: translateX(3px);
  color: var(--color-gold);
}

/* ─── CTA (follows the black catalog band; needs its own divider) ─── */

.insights-cta {
  /* No top padding: the gap above the divider comes entirely from
     insights-catalog's bottom padding, matching insights-cta__inner's
     top padding below the divider, so the line sits equidistant
     between the last catalog row and the CTA heading. */
  padding-top: 0;
  padding-bottom: var(--space-16);
}

.insights-cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-12);
  align-items: center;
  padding-top: var(--space-16);
}

/* Gold accent divider, centered in the gap, fading out at both ends */
.insights-cta__inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-gold) 18%,
    var(--color-gold) 82%,
    transparent
  );
}

.insights-cta__inner h2 {
  font-size: clamp(1.875rem, 3vw, 3rem);
  font-weight: var(--weight-bold);
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.insights-cta__inner p {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.72);
  line-height: var(--leading-body);
  max-width: 52ch;
  margin-bottom: 0;
}

.insights-cta__inner .btn {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .insights-cta__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .insights-cta__inner .btn {
    width: 100%;
    justify-content: center;
  }
}
