/* =========================================================================
   IGRAPHI Insights — light, institutional reading experience.
   Tokens mirror the main igraphi.com site (warm #f7f3ef background, ink
   #363a3e text, red #ED1C24 accent, Playfair Display headings, Inter body,
   Montserrat labels) so statically-served article pages are visually
   identical to the homepage's client-side Insights reader.
   ========================================================================= */

:root {
  --bg: #f7f3ef; /* warm off-white (main site --warm) */
  --bg-2: #ffffff; /* card surface */
  --bg-3: #eeeae4; /* hover surface (main site --warm-2) */
  --text: #363a3e; /* primary text (main site --ink) */
  --body: #52585e; /* reading text */
  --muted: #7a7872;
  --muted-2: rgba(54, 58, 62, 0.55);
  --line: rgba(54, 58, 62, 0.1);
  --red: #ed1c24;
  --red-soft: rgba(237, 28, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Top navigation (mirrors the main site brand bar) ---- */
.ins-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 243, 239, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.ins-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.ins-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ins-logo svg {
  height: 32px;
  width: auto;
}
.ins-logo .name {
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.ins-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.ins-nav-links a {
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.ins-nav-links a:hover,
.ins-nav-links a.active {
  opacity: 1;
}
.ins-nav-links a.active {
  color: var(--red);
}
.ins-cta {
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--red);
  color: var(--red);
  transition: background 0.2s, color 0.2s;
}
.ins-cta:hover {
  background: var(--red);
  color: #fff;
}

/* ---- Shared label / eyebrow ---- */
.label {
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

/* ---- Landing hero ---- */
.ins-hero {
  padding: 88px 0 40px;
  border-bottom: 1px solid var(--line);
}
.ins-hero h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 16px 0 18px;
}
.ins-hero p {
  max-width: 620px;
  font-size: 18px;
  color: var(--body);
}

/* ---- Card grid ---- */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 56px 0 96px;
}
.insight-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.insight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(237, 28, 36, 0.28);
  box-shadow: 0 18px 44px rgba(54, 58, 62, 0.12);
}
.insight-card .thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg-3);
  background-size: cover;
  background-position: center;
}
.insight-card .body {
  padding: 26px 26px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.insight-card .meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
}
.insight-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 12px 0 10px;
}
.insight-card p {
  font-size: 15px;
  color: var(--body);
  margin: 0 0 18px;
}
.insight-card .read {
  margin-top: auto;
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.insight-card .read::after {
  content: "→";
  color: var(--red);
  transition: transform 0.2s;
}
.insight-card:hover .read::after {
  transform: translateX(4px);
}

.empty {
  padding: 80px 0 120px;
  color: var(--muted);
}

/* ---- Article page ---- */
.article-hero {
  padding: 72px 0 0;
}
.article-back {
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  margin-bottom: 34px;
}
.article-back:hover {
  color: var(--red);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 18px;
}
.article-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
  max-width: 900px;
}
.article-feature {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 8px;
  margin: 44px 0 8px;
  border: 1px solid var(--line);
}

/* Markdown body — generous reading column */
.prose {
  max-width: 720px;
  margin: 48px auto 0;
  font-size: 17px;
  line-height: 1.9;
  color: var(--body);
}
.prose h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 52px 0 18px;
}
.prose h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 23px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 14px;
}
.prose p {
  margin: 0 0 24px;
}
.prose strong {
  color: var(--text);
}
.prose a {
  color: var(--red);
  border-bottom: 1px solid rgba(237, 28, 36, 0.4);
}
.prose a:hover {
  border-bottom-color: var(--red);
}
.prose ul,
.prose ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.prose li {
  margin-bottom: 10px;
}
.prose blockquote {
  margin: 32px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--red);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--text);
}
.prose img {
  max-width: 100%;
  border-radius: 8px;
  margin: 16px 0;
}
.prose code {
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

/* ---- Share row (mirrors the homepage reader's .insight-share) ---- */
.insight-share {
  max-width: 720px;
  margin: 48px auto 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.insight-share-label {
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.share-btn {
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.share-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ---- CTA + footer ---- */
.article-cta {
  max-width: 720px;
  margin: 64px auto 0;
  padding: 40px 48px;
  background: #141414;
  border-radius: 4px;
  text-align: left;
}
.article-cta .label {
  color: var(--red);
}
.article-cta .cta-headline {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #f0ece7;
  line-height: 1.35;
  margin: 10px 0 12px;
}
.article-cta p {
  font-size: 14px;
  color: rgba(240, 236, 231, 0.58);
  line-height: 1.7;
  margin: 0 0 28px;
}
.article-cta .btn {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(212, 85, 48, 0.35);
}

.ins-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 40px 0 64px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}
.ins-footer a {
  color: var(--muted);
}
.ins-footer a:hover {
  color: var(--red);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .ins-nav-links {
    display: none;
  }
  .prose {
    font-size: 16px;
  }
  .article-cta {
    padding: 32px 28px;
  }
}
