/* ==========================================================================
   Bordomet — Blog (listing + single post)  •  Industrial-Editorial
   Built on the editorial theme tokens (Space Grotesk headings, Inter body,
   navy #002868 / red #BF0A30). Loaded after editorial.css / about.css.
   Image-path rules (site runs from a subfolder):
     - var(--img) consumed inside this file → resolve from /assets/css/ → "../img/.."
     - inline background-image / <img src> in HTML → document-relative "assets/img/.."
   ========================================================================== */

.blog-page { --blog-measure: 720px; }

/* shared meta line ---------------------------------------------------------- */
.blog-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; font-family: var(--title-font); font-size: 12.5px; color: var(--ed-ink-soft); }
.blog-meta i { color: var(--ed-accent); }
.blog-meta__dot { width: 4px; height: 4px; border-radius: 50%; background: #c7ccd6; }
.blog-meta__cat { font-family: var(--title-font); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ed-accent); }

/* ==========================================================================
   LISTING — lead story (full-bleed cover card) + future-post grid
   ========================================================================== */
.lead-story {
  position: relative; display: block; overflow: hidden;
  min-height: clamp(380px, 52vw, 560px);
  border-radius: var(--ed-r-lg); text-decoration: none; color: #fff;
  background: #0b0e16 center/cover no-repeat;
  isolation: isolate;
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.lead-story::before { /* zoom layer mirrors the inline background-image */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: inherit; background-size: cover; background-position: center;
  transition: transform 0.8s var(--ease);
}
.lead-story:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lead-story:hover::before { transform: scale(1.05); }
.lead-story__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(80% 70% at 8% 100%, rgba(191, 10, 48, 0.30) 0%, transparent 58%),
    linear-gradient(0deg, rgba(7, 9, 14, 0.92) 0%, rgba(7, 9, 14, 0.55) 42%, rgba(7, 9, 14, 0.12) 78%);
}
.lead-story__body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; height: 100%; justify-content: flex-end; padding: clamp(26px, 4vw, 56px); }
.lead-story__cat {
  font-family: var(--title-font); font-weight: 700; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; background: var(--ed-accent); padding: 7px 14px; border-radius: 999px;
}
.lead-story__title { font-family: var(--title-font); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-size: clamp(2rem, 1rem + 3.4vw, 3.6rem); margin: 4px 0 0; text-shadow: 0 2px 26px rgba(0,0,0,0.35); }
.lead-story__excerpt { color: #dde2ec; font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem); line-height: 1.66; max-width: 620px; margin: 0; }
.lead-story__meta { display: inline-flex; flex-wrap: wrap; gap: 8px 18px; color: #c4ccd9; font-family: var(--title-font); font-size: 12.5px; margin-top: 2px; }
.lead-story__meta span { display: inline-flex; align-items: center; gap: 8px; }
.lead-story__meta i { color: #ff8a9c; }
.lead-story__cta {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--title-font); font-weight: 700; font-size: 0.95rem;
  color: #0a1b3d; background: #fff; padding: 12px 22px; border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), gap 0.3s var(--ease);
}
.lead-story:hover .lead-story__cta { background: var(--ed-accent); color: #fff; gap: 14px; }

/* Future posts grid (ready for additional articles) */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 1.8vw, 28px); }
.blog-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ed-line); border-radius: var(--ed-r); overflow: hidden; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.blog-card__media { position: relative; display: block; height: clamp(180px, 17vw, 220px); background-size: cover; background-position: center; }
.blog-card__badge { position: absolute; top: 14px; left: 14px; z-index: 2; font-family: var(--title-font); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; background: var(--ed-accent); padding: 6px 12px; border-radius: 999px; box-shadow: 0 6px 16px rgba(191,10,48,0.28); }
.blog-card--soon .blog-card__media { filter: grayscale(0.55) contrast(1.02); }
.blog-card--soon:hover { transform: none; box-shadow: var(--shadow-sm); }
.blog-card__more.is-soon { color: var(--ed-ink-soft); cursor: default; }
.blog-card__more.is-soon i { color: var(--ed-accent); }
.blog-card__body { padding: clamp(20px, 1.6vw, 26px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.blog-card__title { font-family: var(--title-font); color: var(--ed-ink); font-weight: 800; font-size: 1.2rem; line-height: 1.18; margin: 0; }
.blog-card__title a { color: inherit; text-decoration: none; }
.blog-card__title a:hover { color: var(--ed-accent); }
.blog-card__excerpt { color: var(--ed-ink-soft); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.blog-card__more { margin-top: auto; font-family: var(--title-font); font-weight: 700; font-size: 0.9rem; color: var(--ed-accent); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 991px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   SINGLE POST
   ========================================================================== */
/* Cover-image hero (full-width photo + graded scrim + overlaid title) */
.post-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  display: flex; align-items: flex-end;
  min-height: clamp(440px, 64vh, 640px);
  margin: clamp(10px, 1.3vw, 16px) clamp(8px, 1.8vw, 22px);
  border-radius: clamp(22px, 2.4vw, 40px);
  background: #0b0e16 center/cover no-repeat;
}
.post-hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 64% at 6% 100%, rgba(191, 10, 48, 0.32) 0%, transparent 56%),
    linear-gradient(0deg, rgba(7, 9, 14, 0.94) 0%, rgba(7, 9, 14, 0.60) 44%, rgba(7, 9, 14, 0.18) 80%);
}
.post-hero .ac-container { width: 100%; padding-top: clamp(80px, 13vh, 150px); padding-bottom: clamp(34px, 6vh, 60px); }
.post-hero__inner { max-width: 880px; }
.post-hero .ab-crumb { margin-bottom: 18px; }
.post-hero .ed-eyebrow { color: #fff; }
.post-hero__title { font-family: var(--title-font); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; font-size: clamp(2.3rem, 1rem + 4.4vw, 4.4rem); margin: 16px 0 0; text-shadow: 0 2px 26px rgba(0,0,0,0.4); }
.post-hero__lead { color: #dde2ec; font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.2rem); line-height: 1.6; margin: 18px 0 0; max-width: 640px; }

/* Meta chips (used in hero) */
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 24px 0 0; padding: 0; }
.post-meta li { display: inline-flex; align-items: center; gap: 9px; font-family: var(--title-font); font-weight: 600; font-size: 12.5px; color: #eef1f6; padding: 8px 15px; border-radius: 999px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.post-meta li i { color: #ff8a9c; }

/* Two-column long-read: article on the LEFT, contents rail on the RIGHT.
   Columns are pinned explicitly so source order never matters. */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 274px; gap: clamp(30px, 3.6vw, 60px); align-items: start; }
.post-main { grid-column: 1; grid-row: 1; min-width: 0; }
.post-aside { grid-column: 2; grid-row: 1; align-self: stretch; }

/* Table of contents — sticky right-hand rail (numbered, premium) */
.post-toc {
  background: #fff; border: 1px solid var(--ed-line); border-radius: var(--ed-r);
  padding: 22px 16px 18px; box-shadow: var(--shadow-sm);
}
.post-toc__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--title-font); font-weight: 800; color: var(--ed-ink);
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  margin: 0 6px 12px; padding-bottom: 13px; border-bottom: 1px solid var(--ed-line);
}
.post-toc__title::before { content: ""; flex: none; width: 11px; height: 11px; border-radius: 3px; background: var(--ed-accent); }
.post-toc__list { counter-reset: toc; list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.post-toc__list a {
  display: flex; align-items: baseline; gap: 11px;
  padding: 8px 10px; border-radius: 10px;
  color: var(--ed-ink-soft); text-decoration: none; font-size: 0.9rem; line-height: 1.35;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.post-toc__list li:not(.is-sub) { counter-increment: toc; }
.post-toc__list li:not(.is-sub) > a::before {
  content: counter(toc, decimal-leading-zero); flex: none; min-width: 1.5em;
  font-family: var(--title-font); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.03em;
  color: #b7bdc8; transition: color 0.2s var(--ease); transform: translateY(-1px);
}
.post-toc__list li.is-sub > a { margin-left: 25px; padding-left: 12px; font-size: 0.84rem; border-left: 1px solid var(--ed-line); border-radius: 0 10px 10px 0; }
.post-toc__list li.is-sub > a::before { content: "–"; flex: none; color: #c7ccd6; transition: color 0.2s var(--ease); }
.post-toc__list a:hover { color: var(--ed-ink); background: #f4f6fa; }
.post-toc__list a:hover::before { color: var(--ed-accent); }
.post-toc__list a.is-active { color: var(--ed-accent); background: #fbeef0; font-weight: 600; }
.post-toc__list a.is-active::before { color: var(--ed-accent); }

/* Prose --------------------------------------------------------------------- */
.post-body { counter-reset: sec; color: var(--ed-ink-soft); font-size: 1.08rem; line-height: 1.85; }
.post-body > p { margin: 0 0 1.35em; }
/* Lead paragraph + drop cap */
.post-body > p:first-of-type { font-size: 1.2rem; line-height: 1.7; color: var(--ed-ink); }
.post-body > p:first-of-type::first-letter { float: left; font-family: var(--title-font); font-weight: 800; color: var(--ed-accent); font-size: 3.4em; line-height: 0.78; padding: 0.04em 0.12em 0 0; }

.post-body h2 {
  counter-increment: sec; position: relative; font-family: var(--title-font); color: var(--ed-ink);
  font-weight: 800; letter-spacing: -0.015em; line-height: 1.15;
  font-size: clamp(1.45rem, 1rem + 1.4vw, 2.05rem);
  margin: 1.9em 0 0.7em; padding-top: 0.85em; scroll-margin-top: 100px;
  border-top: 1px solid var(--ed-line);
}
.post-body h2::before {
  content: counter(sec, decimal-leading-zero); display: block;
  font-size: 0.82rem; letter-spacing: 0.18em; color: var(--ed-accent); font-weight: 800;
  margin-bottom: 0.5em;
}
.post-body h3 { font-family: var(--title-font); color: var(--ed-ink); font-weight: 700; font-size: clamp(1.16rem, 1rem + 0.5vw, 1.4rem); margin: 1.7em 0 0.5em; scroll-margin-top: 100px; padding-left: 16px; border-left: 3px solid var(--ed-accent); }
.post-body strong { color: var(--ed-ink); font-weight: 700; }
.post-body a { color: var(--ed-accent); text-decoration: underline; text-underline-offset: 3px; }

.post-body ul { list-style: none; margin: 0 0 1.45em; padding: 0; display: grid; gap: 0.6em; }
.post-body ul li { position: relative; padding-left: 1.9em; line-height: 1.65; }
.post-body ul li::before { content: ""; position: absolute; left: 0.15em; top: 0.6em; width: 8px; height: 8px; border-radius: 2px; background: var(--ed-accent); transform: rotate(45deg); }

/* In-article CTA */
.post-cta { margin-top: clamp(40px, 4.5vw, 64px); border-radius: var(--ed-r-lg); overflow: hidden; position: relative; color: #fff; padding: clamp(30px, 3.6vw, 50px); background: radial-gradient(90% 150% at 90% 0%, rgba(191,10,48,0.30) 0%, transparent 55%), linear-gradient(120deg, #0a2f6b 0%, #061634 100%); }
.post-cta h2 { font-family: var(--title-font); color: #fff; font-weight: 800; font-size: clamp(1.35rem, 1rem + 1vw, 1.95rem); margin: 0 0 10px; line-height: 1.14; }
.post-cta p { color: #dbe7fb; line-height: 1.66; margin: 0 0 22px; max-width: 560px; }
.post-cta .ac-btn { background: #fff; color: var(--theme-color); }
.post-cta .ac-btn:hover { background: var(--accent-color); color: #fff; }

/* Share + back row */
.post-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: clamp(28px, 3vw, 40px); padding-top: clamp(20px, 2vw, 28px); border-top: 1px solid var(--ed-line); }
.post-share { display: inline-flex; align-items: center; gap: 10px; font-family: var(--title-font); font-weight: 600; font-size: 0.9rem; color: var(--ed-ink-soft); }
.post-share a { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ed-ink); border: 1px solid var(--ed-line); background: #fff; transition: 0.3s var(--ease); }
.post-share a:hover { background: var(--ed-accent); border-color: var(--ed-accent); color: #fff; transform: translateY(-3px); }
.post-back { display: inline-flex; align-items: center; gap: 9px; font-family: var(--title-font); font-weight: 700; font-size: 0.95rem; color: var(--ed-ink-soft); text-decoration: none; transition: color 0.25s var(--ease); }
.post-back i { transition: transform 0.3s var(--ease); }
.post-back:hover { color: var(--ed-accent); }
.post-back:hover i { transform: translateX(-4px); }

/* Stack on tablet/mobile: contents card sits above the article */
@media (max-width: 991px) {
  .post-layout { display: block; }
  .post-aside { margin: 0 0 clamp(28px, 4vw, 40px); }
  .post-toc { position: static; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lead-story, .lead-story::before, .lead-story__cta, .blog-card, .post-share a, .post-back i { transition: none !important; }
  .lead-story:hover::before { transform: none !important; }
}
