/* ============================================================
   Sampoll blog 2026 — extends the home-2026 design system.
   Loaded AFTER home-2026.css; uses its :root tokens (--ink,
   --blue, --yellow, --paper, --line, --font-*, --radius…).
   Only blog-specific classes live here — never restyle sp-*
   classes owned by home-2026.css.
   ============================================================ */

/* ---------- Blog index ---------- */

.sp-blog-main {
  padding: 64px 0 96px;
}

.sp-blog-main .sp-sec-head {
  margin-bottom: 44px;
}

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

/* Post cards build on .sp-service (white card, line border, hover lift) */
.sp-post-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.sp-post-card__img {
  aspect-ratio: 2 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
  background: var(--sky);
  border-bottom: 1px solid var(--line);
}

.sp-post-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sp-post-card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.sp-post-card__title {
  font-size: 19px;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.sp-post-card__excerpt {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.sp-post-card__more {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--blue);
}

.sp-blog-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 56px 32px;
  text-align: center;
  color: var(--text-soft);
  font-family: var(--font-mono);
}

/* ---------- Article page ---------- */

.sp-article {
  padding: 56px 0 96px;
}

.sp-article__head {
  max-width: 780px;
  margin: 0 auto 36px;
}

/* Back to the blog index — mono utility voice (kicker family), replaces the
   kicker on article pages so the header stays two lines tall. */
.sp-article__back {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 18px;
}

.sp-article__back span {
  transition: transform 0.15s ease;
}

.sp-article__back:hover {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sp-article__back:hover span {
  transform: translateX(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .sp-article__back span {
    transition: none;
  }

  .sp-article__back:hover span {
    transform: none;
  }
}

.sp-article__head h1 {
  font-size: clamp(32px, 4.5vw, 52px);
  margin: 14px 0 18px;
}

.sp-article__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.sp-article__hero {
  max-width: 900px;
  margin: 0 auto 36px;
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Letterbox the hero: wide banner, not a wall — the article should start
   within the first viewport. Source is cropped CDN-side to match. */
.sp-article__hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  object-fit: cover;
}

.sp-article__cta {
  max-width: 780px;
  margin: 64px auto 0;
}

/* ---------- Long-form prose (net-new; home-2026.css has none) ---------- */

.sp-prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}

.sp-prose p {
  margin: 0 0 1.4em;
}

.sp-prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sp-prose a:hover {
  color: var(--blue-deep);
}

.sp-prose h2,
.sp-prose h3,
.sp-prose h4 {
  margin: 1.8em 0 0.6em;
  line-height: 1.15;
}

.sp-prose h2 { font-size: 30px; }
.sp-prose h3 { font-size: 24px; }
.sp-prose h4 { font-size: 20px; }

.sp-prose ul,
.sp-prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.sp-prose li {
  margin-bottom: 0.5em;
}

.sp-prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--yellow);
  color: var(--text-soft);
  font-style: italic;
}

.sp-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 1.8em 0;
}

.sp-prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

.sp-prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--sky);
  padding: 2px 6px;
  border-radius: 6px;
}

.sp-prose pre {
  background: var(--ink);
  color: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.8em 0;
}

.sp-prose pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.sp-prose strong {
  font-weight: 700;
}

/* ---------- FAQ accordion (native details/summary — no JS) ---------- */

.sp-faq {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sp-faq__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.sp-faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  position: relative;
}

.sp-faq__item summary::-webkit-details-marker {
  display: none;
}

/* Mono +/− marker — same utility voice as tags and kickers */
.sp-faq__item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--blue);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.sp-faq__item[open] summary::after {
  content: '−';
}

.sp-faq__item[open] {
  border-color: var(--blue);
}

.sp-faq__answer {
  padding: 0 22px 20px;
  font-size: 16px;
}

.sp-faq__answer p:last-child {
  margin-bottom: 0;
}

/* ---------- Responsive (match home-2026 breakpoints) ---------- */

@media (max-width: 900px) {
  .sp-post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .sp-post-grid {
    grid-template-columns: 1fr;
  }

  .sp-blog-main {
    padding: 40px 0 64px;
  }

  .sp-prose {
    font-size: 17px;
  }

  /* Slightly taller hero ratio on small screens so it doesn't shrink
     into a sliver. */
  .sp-article__hero img {
    aspect-ratio: 16 / 10;
  }
}
