/* ============================================================
   Elcano public site — Insights hub + article pages
   ============================================================
   Loaded AFTER site.css on /content and every /content/<slug>
   article page. Defines two things:

     1. The Insights index grid (hub hero + responsive cards).
     2. The article reading layout (centered ~680px prose column,
        styled headings/lists/quotes, pull-stat treatment, CTA,
        back-to-Insights link).

   Every color/font references a token from tokens.css so both
   dark (default) and light mode work. No hard-coded hex values.
   ============================================================ */

/* ===== Shared: eyebrow / back link ===== */
.content-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
}

.content-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--speed-base) ease, gap var(--speed-base) ease;
}
.content-back:hover { color: var(--accent); gap: 12px; }
.content-back .arrow { font-size: 16px; }

/* ============================================================
   1. INSIGHTS HUB — /content
   ============================================================ */
.insights-hero {
  position: relative;
  z-index: 1;
}
.insights-hero .container {
  padding-block: clamp(64px, 12vh, 128px) clamp(28px, 5vw, 48px);
}
.insights-hero-inner {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.insights-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.025em;
  color: var(--text-strong);
}
.insights-sub {
  font-size: clamp(17px, 4.3vw, 20px);
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
  max-width: 680px;
}

.insights-section {
  position: relative;
  z-index: 1;
}
.insights-section .container {
  padding-block: clamp(28px, 5vw, 44px);
}
.insights-section .container:last-child { padding-bottom: clamp(64px, 10vw, 112px); }

.insights-group-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.insights-group-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.6vw, 26px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  margin: 0;
}
.insights-group-count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.insight-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px 26px;
  border-radius: 16px;
  background-color: var(--surface-alt);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  transition: border-color var(--speed-base) ease, transform var(--speed-base) ease,
    box-shadow var(--speed-base) ease;
}
.insight-card:hover {
  border-color: var(--chip-feature-border);
  transform: translateY(-3px);
  box-shadow: 0 22px 46px -28px rgba(0, 0, 0, 0.45);
}
.insight-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.insight-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  align-self: flex-start;
  border: 1px solid var(--chip-feature-border);
  background: var(--chip-feature-bg);
  border-radius: 999px;
  padding: 4px 11px;
}
.insight-title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  margin: 0;
}
.insight-summary {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}
.insight-more {
  margin-top: auto;
  padding-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--speed-base) ease;
}
.insight-card:hover .insight-more { gap: 13px; }
.insight-more .arrow { font-size: 15px; }

/* card thumbnail — bleeds to the card edge above the tag */
.insight-thumb {
  margin: -28px -26px 6px;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}
.insight-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--speed-base) ease;
}
.insight-card:hover .insight-thumb img { transform: scale(1.03); }

/* ============================================================
   2. ARTICLE PAGES — /content/<slug>
   ============================================================ */
.article {
  position: relative;
  z-index: 1;
}
.article .container {
  padding-block: clamp(40px, 7vh, 72px) clamp(64px, 10vw, 112px);
}

/* readable measure — everything in the article body is centered
   in a ~720px shell; prose paragraphs narrow further to ~680px */
.article-shell {
  max-width: 720px;
  margin: 0 auto;
}

.article-topbar { margin-bottom: clamp(28px, 5vw, 44px); }

.article-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: clamp(32px, 6vw, 52px);
  padding-bottom: clamp(28px, 5vw, 40px);
  border-bottom: 1px solid var(--border-soft);
}
.article-title {
  font-family: var(--font-display);
  font-size: clamp(31px, 5.6vw, 50px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}
.article-lead {
  font-size: clamp(18px, 4.3vw, 22px);
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
  font-weight: 500;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.article-meta .sep { color: var(--divider); }

/* hero image — sits between the header rule and the prose */
.article-hero {
  margin: 0 0 clamp(32px, 6vw, 52px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--surface-alt);
}
.article-hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* prose body */
.article-body {
  max-width: 680px;
}
.article-body figure {
  margin: 2em 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--surface-alt);
}
.article-body figure img {
  width: 100%;
  height: auto;
  display: block;
}
.article-body figcaption {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-soft);
}
.article-body > * + * { margin-top: 1.35em; }
.article-body p {
  font-size: clamp(16.5px, 4vw, 18px);
  line-height: 1.72;
  color: var(--text-body);
  margin: 0;
  text-wrap: pretty;
}
.article-body p a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--chip-feature-border);
}
.article-body p a:hover { text-decoration-color: var(--accent); }
.article-body strong { color: var(--text-strong); font-weight: 600; }

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(23px, 4.4vw, 30px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0;
  margin-top: 1.9em;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 3.6vw, 22px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  margin: 0;
  margin-top: 1.6em;
}
.article-body h2 + p,
.article-body h3 + p { margin-top: 0.7em; }

.article-body ul,
.article-body ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-body ul li {
  position: relative;
  padding-left: 26px;
  font-size: clamp(16px, 3.9vw, 17.5px);
  line-height: 1.6;
  color: var(--text-body);
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
}
.article-body ol {
  counter-reset: art-ol;
}
.article-body ol li {
  position: relative;
  padding-left: 34px;
  font-size: clamp(16px, 3.9vw, 17.5px);
  line-height: 1.6;
  color: var(--text-body);
  counter-increment: art-ol;
}
.article-body ol li::before {
  content: counter(art-ol);
  position: absolute;
  left: 0;
  top: 0.05em;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--chip-feature-border);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-body blockquote {
  margin: 1.9em 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: clamp(19px, 4vw, 24px);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}

/* pull-stat treatment — headline numbers */
.pull-stat {
  margin: 2em 0;
  padding: 32px 30px;
  border-radius: 16px;
  background-color: var(--surface-alt);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.pull-stat-value {
  font-family: var(--font-display);
  font-size: clamp(44px, 10vw, 68px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.pull-stat-label {
  font-size: clamp(15px, 3.8vw, 17px);
  line-height: 1.5;
  color: var(--text-body);
  max-width: 44ch;
  margin: 0 auto;
}

/* two/three-up stat row */
.pull-stat-row {
  margin: 2em 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.pull-stat-row .pull-stat { margin: 0; }
.pull-stat-row .pull-stat-value { font-size: clamp(38px, 8vw, 52px); }
.pull-stat-row .pull-stat-label { font-size: 14px; }

/* end-of-article CTA */
.article-cta {
  margin-top: clamp(44px, 7vw, 72px);
  padding: clamp(32px, 5vw, 48px);
  border-radius: 18px;
  background-color: var(--surface-alt);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.article-cta-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4.4vw, 30px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin: 0;
}
.article-cta-copy {
  font-size: clamp(16px, 4vw, 18px);
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
  max-width: 52ch;
}

.article-footer-back {
  margin-top: clamp(36px, 6vw, 56px);
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .insights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .insights-grid { grid-template-columns: 1fr; }
}
