/**
 * Spacing rhythm, imagery, and editorial layout
 */

:root {
  --space-section: clamp(4.5rem, 9vw, 7rem);
  --space-section-sm: clamp(3rem, 6vw, 4.5rem);
  --space-block: clamp(2.5rem, 5vw, 4rem);
  --space-element: 1.5rem;
  --space-element-lg: 2.25rem;
  --content-max: 72rem;
  --read-max: 40rem;
}

.section-block {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.section-block--sm {
  padding-top: var(--space-section-sm);
  padding-bottom: var(--space-section-sm);
}

.section-block--band {
  padding-top: var(--space-block);
  padding-bottom: var(--space-block);
}

.section-header {
  margin-bottom: var(--space-element-lg);
}

.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: var(--read-max);
}

.section-header p:last-child {
  margin-top: 1rem;
  line-height: 1.65;
}

.section-kicker {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-start);
}

.section-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  line-height: 1.2;
  color: var(--text-heading);
}

/* Hero split */
.hero-split {
  text-align: center;
}

@media (min-width: 1024px) {
  .hero-split {
    text-align: left;
  }
}

.hero-visual {
  position: relative;
  margin-top: var(--space-element-lg);
}

@media (min-width: 1024px) {
  .hero-visual {
    margin-top: 0;
  }
}

.hero-visual-frame {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  box-shadow: 0 20px 50px rgba(26, 35, 50, 0.1);
}

.hero-visual-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Wide diagrams / illustrations (e.g. human-in-the-loop) — avoid 4:3 crop */
.hero-visual-frame--illustration {
  background: linear-gradient(180deg, #f8f6f2 0%, var(--bg-elevated) 100%);
}

.hero-visual-frame--illustration .hero-visual-img {
  padding: 0.75rem 1rem 1rem;
}

/* Media cards */
.media-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
}

.media-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.media-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.media-card:hover .media-card__image img {
  transform: scale(1.03);
}

.media-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.75rem;
}

.media-card__body h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--text-heading);
}

.media-card__body p {
  margin-top: 0.65rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  flex: 1;
}

.media-card__link {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-start);
}

/* Proof cards */
.proof-card .media-card__image {
  aspect-ratio: 16 / 9;
}

/* Visual band (consulting / about) */
.visual-band {
  background: linear-gradient(135deg, #eef2f8 0%, var(--bg-secondary) 100%);
  border-block: 1px solid var(--border-subtle);
}

.visual-band__grid {
  display: grid;
  gap: var(--space-element-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .visual-band__grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.visual-band__copy h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  line-height: 1.25;
  color: var(--text-heading);
}

.visual-band__copy p {
  margin-top: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.visual-band__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.visual-band__stat {
  padding: 0.85rem;
  border-radius: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.visual-band__stat strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-start);
}

.visual-band__stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

/* Approach split */
.approach-split {
  display: grid;
  gap: var(--space-element-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .approach-split {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

.approach-split__image {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft, 0 8px 30px rgba(26, 35, 50, 0.08));
}

.approach-split__image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

/* Article lead image (articles without inline figures) */
.article-lead-visual {
  margin: 0 0 2rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 32px rgba(26, 35, 50, 0.08);
}

.article-lead-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--bg-elevated);
}

/* Insights index — text-first list */
.insights-page-header {
  background: var(--bg-primary);
}

.insights-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.insights-filter {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.insights-filter:hover,
.insights-filter.active {
  color: var(--accent-start);
  border-color: rgba(34, 211, 238, 0.45);
}

.insights-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.insights-article-item {
  border-bottom: 1px solid var(--border-subtle);
}

.insights-article-item:last-child {
  border-bottom: none;
}

.insights-article-item a {
  display: block;
  padding: 1.25rem 0;
  text-decoration: none;
  color: inherit;
}

.insights-article-item a:hover .insights-article-item__title {
  color: var(--accent-start);
}

.insights-article-item__meta {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-start);
}

.insights-article-item__title {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading);
  transition: color 0.15s ease;
}

.insights-article-item__deck {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.insights-hero-visual img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

/* Card grid spacing */
.card-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.card-grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Contact CTA block */
.cta-panel {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-element-lg);
  border-radius: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 40px rgba(26, 35, 50, 0.06);
}

.cta-panel h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.cta-panel p {
  margin-top: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.cta-panel .cta-button {
  margin-top: 1.75rem;
}
