/* ============================================================
   DIGITX — overrides
   1) Logo image in place of the text wordmark (nav + footer)
   2) Typography: Space Grotesk (display) + Geist (body) + Geist Mono (labels)
   3) Emphasis words = chartreuse highlighter band (navy on #d4d41c)
   Loaded AFTER styles.css so these rules win.
   ============================================================ */

:root { --font-display: 'Space Grotesk', sans-serif; }

/* ---------- 1. Logo ----------
   Real DIGITX artwork (logo.png, 1142x312, transparent). Aspect ratio ~3.66,
   so width = height * 3.66 to avoid distortion. Shown via ::before in place of
   the old text wordmark + chevron mark. */
.brand .brand-mark,
.brand .brand-wordmark { display: none !important; }

.brand::before {
  content: "";
  display: inline-block;
  width: 110px;
  height: 30px;
  background: url('logo.png') left center / contain no-repeat;
  flex: 0 0 auto;
}
.footer .brand::before { width: 125px; height: 34px; }
@media (max-width: 600px) {
  .brand::before { width: 99px; height: 27px; }
}

/* ---------- 2. Body (Geist) ---------- */
html, body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 2. Display / headings (Space Grotesk) ---------- */
.hero h1,
.section-title,
.statement-big,
.cta h2,
.manifesto-quote,
.stat-num,
.process-cell h3,
.agent-name,
.industry h4,
.geo-cell .city,
.demo-toolbar-title {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  font-style: normal !important;
}

.hero h1        { letter-spacing: -0.04em; line-height: 1.02; }
.statement-big  { letter-spacing: -0.045em; line-height: 1.0; }
.cta h2         { letter-spacing: -0.04em; line-height: 1.02; }
.section-title  { letter-spacing: -0.03em; line-height: 1.04; }
.manifesto-quote{ letter-spacing: -0.025em; line-height: 1.1; }
.stat-num       { letter-spacing: -0.03em; }
.process-cell h3, .agent-name, .industry h4, .geo-cell .city { letter-spacing: -0.025em; line-height: 1.05; }

.manifesto-quote::before { font-family: var(--font-display); }

/* ---------- 2. Mono micro-labels (Geist Mono) ---------- */
.section-num,
.stat-label,
.eyebrow,
.logo-wall-label,
.manifesto-sig,
.statement-side .label,
.brand-tag,
.footer-col h5,
.footer-bottom,
.demo-toolbar-meta,
.demo-pane-header,
.wf-meta,
.agent-specs,
.industry-metric,
.diagram-label {
  font-family: 'Geist Mono', ui-monospace, monospace !important;
}

/* ---------- 3. Emphasis = highlighter band (navy on chartreuse) ---------- */
.hero h1 em,
.section-title em,
.statement-big em,
.cta h2 em,
.manifesto-quote em,
.blog-hero-title em {
  font-style: normal !important;
  color: #1f3a52 !important;
  background: #d4d41c;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0.02em 0.16em;
  border-radius: 2px;
}

/* ============================================================
   4. Blog (blog.html) — built from the same tokens & type system
   ============================================================ */

/* Active nav link (current page) */
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  display: block;
  height: 2px;
  margin-top: 3px;
  background: var(--accent);
}

/* ---------- Blog hero ---------- */
.blog-hero {
  border-bottom: 1px solid var(--line);
  padding: 96px 0 56px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(212,212,28,0.10), transparent 60%);
}
.blog-hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--ink);
  max-width: 14ch;
  margin-top: 18px;
  text-wrap: balance;
}
.blog-hero-sub {
  margin-top: 22px;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------- Feed wrapper ---------- */
.blog-feed { border-bottom: 1px solid var(--line); }

/* ---------- Featured post ---------- */
.featured-post {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--line);
  background: var(--bg);
  margin-bottom: 40px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.featured-post:hover {
  border-color: var(--accent-d);
  box-shadow: 0 26px 60px -36px rgba(14,17,23,0.32);
  transform: translateY(-2px);
}
.featured-media {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  min-height: 280px;
  overflow: hidden;
}
.cover-svg { width: 100%; height: 100%; display: block; }
.featured-post:hover .featured-media .cover-svg { transform: scale(1.03); }
.featured-media .cover-svg { transition: transform 0.4s ease; }
.featured-body {
  padding: 40px 40px 36px;
  display: flex;
  flex-direction: column;
}
.featured-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 16px 0 14px;
  text-wrap: balance;
}
.featured-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 22px;
}

/* ---------- Post grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.post-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  background: var(--panel);
  border-color: var(--accent-d);
  box-shadow: 0 18px 40px -28px rgba(14,17,23,0.28);
}
.post-card-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.post-card-cover .cover-svg { transition: transform 0.4s ease; }
.post-card:hover .post-card-cover .cover-svg { transform: scale(1.04); }
.post-card-body {
  padding: 22px 24px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card-body .post-meta { margin-bottom: 12px; }
.post-id {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  transition: color 0.2s;
}
.post-card:hover .post-id { color: var(--accent-text); }
.post-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 12px 0 10px;
  text-wrap: balance;
}
.post-excerpt {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 18px;
}

/* ---------- Shared post meta / tag / read-more ---------- */
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.post-tag {
  color: var(--accent-text);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  padding: 3px 8px;
}
.post-readmore {
  margin-top: auto;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-readmore .arrow { transition: transform 0.2s; }
.featured-post:hover .post-readmore .arrow,
.post-card:hover .post-readmore .arrow { transform: translateX(4px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-media { border-right: none; border-bottom: 1px solid var(--line); min-height: 200px; }
  .featured-body { padding: 28px 24px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-hero { padding: 72px 0 40px; }
  .post-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   5. Blog article (post.html) — full-width cover, then content
   ============================================================ */
.post-detail { display: block; }

/* Full-bleed cover banner, matching the page width */
.post-detail-cover {
  width: 100%;
  height: clamp(220px, 42vh, 420px);
  overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}

/* Image covers: crop-to-fill inside fixed-shape thumbnails (cards / featured),
   matching how the generated SVG covers behave. */
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Real image covers render centered inside the article column (not full-bleed):
   shown in full at the text measure, rounded and framed like the reference. */
.article-cover {
  margin: 16px 0 8px;
}
.article-cover .cover-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--line);
}

/* Readable single-column article measure */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0 80px;
}

.article-back {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.article-back:hover { color: var(--ink); }
.article-back .arrow { transition: transform 0.2s; }
.article-back:hover .arrow { transform: translateX(-3px); }

.article-meta { margin: 26px 0 18px; }

.article-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

.article-lede {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.article-rule {
  height: 1px;
  background: var(--line);
  margin: 36px 0 8px;
}

.article-body { color: var(--ink); }

.article-p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-top: 22px;
}

.article-h {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 40px;
}

.article-quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 26px;
  margin: 38px 0;
  text-wrap: balance;
}

.article-list {
  margin-top: 22px;
  padding-left: 0;
  list-style: none;
}
.article-list li {
  position: relative;
  padding-left: 26px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-top: 12px;
}
.article-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 11px;
  width: 9px;
  height: 9px;
  background: var(--accent);
}

.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
  .article-wrap { padding: 36px 0 56px; }
  .article-lede { font-size: 17px; }
  .article-p, .article-list li { font-size: 16px; }
}
