/* ============================================================
   SPOTlight Blog — shared styles
   Design tokens mirror the main app (index.html / privacy.html)
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f5f2;
  --bg-deep: #ecece8;
  --surface: #ffffff;
  --surface-muted: #f0f0ec;
  --border: rgba(0, 0, 0, 0.08);
  --text: #1c1c1e;
  --text-muted: #636366;
  --text-soft: #8e8e93;
  --accent: #f8f180;
  --accent-hover: #eee06a;
  --accent-contrast: #1c1c1e;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.05);
  --radius: 24px;
  --radius-sm: 14px;
}

html { scroll-behavior: smooth; }
html, body { min-height: 100%; background: var(--bg); }

body {
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 4rem;
}
.wrap--article { max-width: 720px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.2rem;
  margin-bottom: 2.5rem;
}
.topbar-actions { display: flex; align-items: center; gap: 0.4rem; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: block; object-fit: cover; flex-shrink: 0;
}
.brand-name { font-weight: 600; font-size: 0.98rem; }
.brand-name span { color: var(--text-muted); font-weight: 500; }

.ghost-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.ghost-link:hover { color: var(--text); background: var(--surface-muted); }
.ghost-link--accent {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: transparent;
  font-weight: 600;
}
.ghost-link--accent:hover { background: var(--accent-hover); color: var(--accent-contrast); }

/* ---------- Blog index header ---------- */
.blog-head { text-align: center; max-width: 640px; margin: 1rem auto 3rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.blog-head h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 0.8rem;
}
.blog-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Post grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 680px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--hover-border, rgba(0, 0, 0, 0.12));
}
.post-card .tag { margin-bottom: 0.9rem; }
.post-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 0.55rem;
}
.post-card .excerpt {
  color: var(--text-muted);
  font-size: 0.93rem;
  flex: 1;
  margin-bottom: 1.2rem;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-soft); }

/* ---------- Category tag ---------- */
.tag {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--chip-bg, rgba(28, 28, 30, 0.06));
  color: var(--text-muted);
  align-self: flex-start;
}
.tag--seo { background: rgba(45, 138, 87, 0.14); color: #2d8a57; }
.tag--social { background: rgba(138, 114, 0, 0.14); color: #8a7200; }
.tag--access { background: rgba(99, 99, 102, 0.14); color: #4a4a4f; }
.tag--mobile { background: rgba(192, 57, 57, 0.12); color: #c03939; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { color: var(--text-soft); }

/* ---------- Article ---------- */
.article-head { margin-bottom: 2rem; }
.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.6rem;
}
.back-link:hover { color: var(--text); }
.article-head h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0.9rem 0 0.9rem;
}
.article-head .post-meta { font-size: 0.85rem; }

.prose { font-size: 1.04rem; color: var(--text); }
.prose > * + * { margin-top: 1.15rem; }
.prose p { color: #2c2c2e; }
.prose h2 {
  font-family: "Space Grotesk", "Outfit", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2.4rem;
  margin-bottom: 0.2rem;
}
.prose h3 {
  font-size: 1.12rem;
  font-weight: 600;
  margin-top: 1.8rem;
  margin-bottom: 0.1rem;
}
.prose ul, .prose ol { padding-left: 1.3rem; color: #2c2c2e; }
.prose li { margin-top: 0.45rem; }
.prose li::marker { color: var(--text-soft); }
.prose a { color: var(--text); text-underline-offset: 2px; }
.prose strong { font-weight: 600; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}
.prose pre {
  background: #1c1c1e;
  color: #f5f5f2;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}
.prose pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.1rem;
  color: var(--text-muted);
  font-style: italic;
}
.lead { font-size: 1.15rem; color: var(--text-muted); line-height: 1.55; }

/* Comparison table */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose th {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface-muted);
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose td strong { color: var(--text); }

/* Callout */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  font-size: 0.96rem;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }

/* ---------- Table of contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 1.8rem 0 0.5rem;
}
.toc-title {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.7rem;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc li + li { margin-top: 0.4rem; }
.toc a {
  display: flex;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.toc a::before {
  content: counter(toc);
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 1ch;
}
.toc a:hover { color: var(--text); }

.prose h2 { scroll-margin-top: 1.5rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 2.6rem; }
.faq > h2 {
  font-family: "Space Grotesk", "Outfit", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1.1rem 1.3rem;
}
.faq-item + .faq-item { margin-top: 0.7rem; }
.faq-item h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.faq-item p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ---------- Related reading ---------- */
.related { margin-top: 2.8rem; }
.related-title {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.9rem;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
@media (min-width: 600px) { .related-grid { grid-template-columns: 1fr 1fr; } }
.related-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.related-card .tag { margin-bottom: 0.55rem; font-size: 0.68rem; }
.related-card h4 { font-size: 0.98rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }

/* ---------- CTA card ---------- */
.cta-card {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.cta-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.cta-card p { color: var(--text-muted); margin-bottom: 1.3rem; max-width: 440px; margin-left: auto; margin-right: auto; }
.cta-btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.cta-btn:hover { background: var(--accent-hover); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--text-soft);
  font-size: 0.82rem;
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer nav { display: flex; gap: 1rem; }
