/* ==========================================================================
   SmartHive Insights — article layout.
   Loaded after blog.css on single article pages only (body.article-page).
   Every rule is scoped under .article-page so the index is unaffected.
   ========================================================================== */

.article-page .blog-article { padding-top: 46px; }

/* Hero: a controlled header column above a wider image. */
.article-page .article-hero { max-width: 880px; margin: 0 auto; }
.article-page .article-hero h1 {
  max-width: 17ch;
  margin-bottom: 22px;
  font-size: clamp(2.2rem, 4.4vw, 3.5rem) !important;
  line-height: 1.08;
}
.article-page .article-hero .lead {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.7;
}
.article-page .article-hero .blog-meta {
  margin: 30px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Image: wide editorial frame, cropped to keep faces in view. */
.article-page .article-figure {
  max-width: 1180px;
  margin: 48px auto 56px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #e9e5de;
}
.article-page .article-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

/* Reading column: about 760px, roughly 70 characters per line. */
.article-page .article-body {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.72;
}
.article-page .article-body > p { margin: 0 0 16px; }
.article-page .article-body h2 {
  margin: clamp(40px, 4.2vw, 52px) 0 12px;
  color: var(--navy);
  font-family: var(--type-serif);
  font-size: clamp(1.3rem, 1.9vw, 1.6rem) !important;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -.02em;
}
.article-page .article-body > h2:first-child { margin-top: 0; }

/* Five-stage journey: a vertical connector on desktop and mobile alike. */
.article-page .journey {
  position: relative;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}
.article-page .journey li,
.article-page .constraints li {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
}
.article-page .journey li { padding-bottom: 22px; }
.article-page .journey li:last-child { padding-bottom: 0; }
.article-page .journey li::before {
  content: '';
  position: absolute;
  top: 44px;
  bottom: 0;
  left: 25px;
  width: 1px;
  background: var(--line);
}
.article-page .journey li:last-child::before { display: none; }
.article-page .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid #a6b9aa;
  border-radius: 50%;
  background: var(--ivory, #faf8f5);
  color: var(--green);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.article-page .journey li:nth-child(3) .step-num { border-color: var(--gold); color: #a86f1f; }
.article-page .journey h3,
.article-page .constraints h3 {
  margin: 12px 0 6px;
  color: var(--navy);
  font-family: var(--type-serif);
  font-size: clamp(1.08rem, 1.3vw, 1.2rem);
  font-weight: 500;
  line-height: 1.3;
}
.article-page .journey p,
.article-page .constraints p { margin: 0; }

/* Four constraints: two editorial columns with hairline separators. */
.article-page .constraints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}
.article-page .constraints li {
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 20px 0 22px;
  border-top: 1px solid var(--line);
}
.article-page .constraints .step-num {
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--green);
  font-family: var(--type-sans, inherit);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  align-self: start;
  padding-top: 6px;
}
.article-page .constraints h3 { margin-top: 0; }

/* In practice: a warm, restrained scenario panel. */
.article-page .case-example {
  margin: 32px 0;
  padding: 24px 28px;
  background: #f3efe6;
  border-left: 2px solid var(--gold);
}
.article-page .case-example p:not(.case-label) { margin: 0; }
.article-page .case-label {
  margin-bottom: 12px !important;
  color: #a86f1f;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* Key takeaway: the anchor of the article. */
.article-page .blog-takeaway {
  margin: 36px 0;
  padding: 26px 30px;
  border-left: 2px solid var(--green);
  background: #e9f3ee;
}
.article-page .blog-takeaway .eyebrow { display: flex; align-items: center; gap: 12px; }
.article-page .blog-takeaway .eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.article-page .blog-takeaway > p:not(.eyebrow) {
  margin: 0;
  color: var(--navy);
  font-family: var(--type-serif);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.45;
}

/* FAQ: native details, one open at a time (name="faq"). */
.article-page .faq { margin-top: 52px; }
.article-page .faq h2 { margin-top: 0; }
.article-page .faq-item { border-top: 1px solid var(--line); }
.article-page .faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.article-page .faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  color: var(--navy);
  font-family: var(--type-serif);
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  transition: color 250ms ease;
}
.article-page .faq-item summary::-webkit-details-marker { display: none; }
.article-page .faq-item summary::after {
  content: '+';
  flex: 0 0 auto;
  color: var(--green);
  font-family: var(--type-sans, inherit);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 300ms ease;
}
.article-page .faq-item[open] summary::after { content: '×'; }
.article-page .faq-item summary:hover { color: var(--green); }
.article-page .faq-item summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: 4px;
}
.article-page .faq-item > p { margin: 0 0 24px; padding-right: 40px; }
.article-page .faq-item[open] > p { animation: faq-in 320ms ease both; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* Closing paragraph and the back link. */
.article-page .article-closing {
  margin-top: 40px;
  color: var(--navy);
  font-size: 1.0625rem;
}
.article-page .blog-article-back { margin-top: 40px; }

/* Responsive: stack the constraint grid and tighten the hero. */
@media (max-width: 900px) {
  .article-page .constraints { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .article-page .article-figure { aspect-ratio: 4 / 3; margin: 28px 0 40px; border-radius: 20px; }
  .article-page .article-body { font-size: 1rem; line-height: 1.7; }
  .article-page .article-body h2 { font-size: 1.3rem !important; margin-top: 40px; }
  .article-page .article-figure img { object-position: 50% 50%; }
  .article-page .case-example { padding: 24px 22px; }
  .article-page .blog-takeaway { padding: 24px 22px; }
  .article-page .faq-item > p { padding-right: 0; }
}
@media (max-width: 430px) {
  .article-page .journey li, .article-page .constraints li { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .article-page .step-num { width: 44px; height: 44px; }
  .article-page .journey li::before { top: 38px; left: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .article-page .faq-item[open] > p { animation: none; }
  .article-page .faq-item summary, .article-page .faq-item summary::after { transition: none; }
}
