/* Social Compass Blog — styled to match app landing page */

/* ── Google Fonts: Outfit (same as landing page nav/hero) ── */
/* Google Fonts loaded via <link> tags in HTML <head> for performance — do not use @import */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:          #E64A19;
  --brand-dark:     #BF360C;
  --brand-light:    #FFF3F0;
  --brand-border:   rgba(230,74,25,0.25);
  --primary-container: #FCEEE9;   /* ~primaryContainer in app theme */
  --surface-low:    #FAF7F7;      /* ~surfaceContainerLow */
  --outline:        rgba(0,0,0,0.12);  /* ~outlineVariant */
  --text:           #1C1B1F;      /* ~onSurface */
  --muted:          #6B6472;      /* ~onSurfaceVariant */
  --bg:             #FFFFFF;
  --max-w:          780px;
  --radius-sm:      10px;
  --radius:         16px;
  --radius-lg:      24px;
  --font-body:      system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display:   'Outfit', system-ui, sans-serif;
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  /* gradient background matching landing: surface → primaryContainer 0.3 */
  background: linear-gradient(135deg, #ffffff 0%, #fdf4f1 100%);
  min-height: 100vh;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Site header — matches landing nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline);
  padding: 0 1.25rem;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

/* Logo: icon box + "Social Compass" in Outfit bold — mirrors landing nav */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

.site-logo__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-logo__icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.site-logo__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-low); text-decoration: none; }
.nav-link--active { color: var(--brand); }

/* CTA button — matches FilledButton in app */
.btn-cta {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none !important;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn-cta:hover { background: var(--brand-dark); box-shadow: 0 4px 12px rgba(230,74,25,0.25); }

/* ── Page wrapper ── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

/* ── Category pill — matches app _PlanPill / badge labels ── */
.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.9rem;
}

/* ── Article header ── */
.post-header { margin-bottom: 2rem; }

.post-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.post-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Article body typography ── */
.post-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 2.2rem 0 0.7rem;
  color: var(--text);
}

.post-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 1.7rem 0 0.5rem;
  color: var(--text);
}

.post-body p  { margin: 0 0 1rem; }
.post-body ul, .post-body ol { margin: 0 0 1rem 1.5rem; }
.post-body li { margin-bottom: 0.45rem; }
.post-body strong { font-weight: 600; }

/* ── CTA block — card style matching app quote cards ── */
.cta-block {
  background: var(--surface-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.cta-block::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
}

.cta-block p {
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--text);
}

/* ── Related posts ── */
.related {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--outline);
}

.related__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }

.related a {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.related a::before { content: '→'; color: var(--brand); font-size: 0.85rem; }
.related a:hover { color: var(--brand); text-decoration: none; }

/* ── Site footer ── */
.site-footer {
  border-top: 1px solid var(--outline);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); text-decoration: none; }

/* ── Blog index: hero ── */
.blog-hero {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}

.blog-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

/* ── Blog index: card grid ── */
.card-grid {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  padding: 0 1.25rem 4rem;
}

/* Post card — mirrors app _QuoteCard style */
.post-card {
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-3px);
  border-color: var(--brand-border);
}

.post-card__tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 0.18rem 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.85rem;
  width: fit-content;
}

.post-card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  flex: 1;
}

.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--brand); text-decoration: none; }

.post-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Page-level index wrapper ── */
.index-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Key Takeaways box ── */
.key-takeaways {
  background: var(--surface-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 1.4rem 1.75rem;
  margin: 1.75rem 0 2rem;
}

.key-takeaways__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.key-takeaways__label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.key-takeaways ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.key-takeaways li {
  font-size: 0.92rem;
  color: var(--text);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.5;
}

.key-takeaways li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  top: 1px;
}

/* ── FAQ section ── */
.faq {
  margin-top: 2.5rem;
  border-top: 1px solid var(--outline);
  padding-top: 1.5rem;
}

.faq__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.faq details {
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.faq details[open] {
  border-color: var(--brand-border);
}

.faq summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  user-select: none;
}

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

.faq summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--brand);
  flex-shrink: 0;
  margin-left: 0.75rem;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details[open] summary {
  color: var(--brand);
  border-bottom: 1px solid var(--outline);
}

.faq__answer {
  padding: 0.9rem 1.25rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; padding: 0 1rem 3rem; }
  .page-wrap { padding: 1.75rem 1rem 3.5rem; }
  .site-header__nav .nav-link { display: none; }
}
