/* ═══════════════════════════════════════
   SaaS Pulse Media — Stylesheet
   Aesthetic: Editorial · Data-forward · Sharp
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,600&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --ink:       #0d0f12;
  --ink2:      #1e2228;
  --surface:   #f5f4f0;
  --surface2:  #eceae4;
  --white:     #fdfcfa;
  --accent:    #0057ff;
  --accent2:   #003db5;
  --gold:      #c9973a;
  --muted:     #6b7280;
  --muted2:    #9ca3af;
  --border:    #e2dfd8;
  --border2:   #ccc9c0;

  --serif:  'Fraunces', Georgia, serif;
  --sans:   'DM Sans', system-ui, sans-serif;
  --mono:   'DM Mono', monospace;

  --max:    1140px;
  --r:      6px;
  --shadow: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--sans); border: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ══════════════════════════════════
   HEADER / NAV
══════════════════════════════════ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.logo-mark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
}
.logo-mark span { color: var(--accent); }
.logo-tag {
  font-family: var(--mono);
  font-size: .58rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  border-left: 1px solid var(--border2);
  padding-left: 8px;
  margin-left: 2px;
}
nav { display: flex; align-items: center; gap: 28px; }
nav a {
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s;
  letter-spacing: .01em;
}
nav a:hover, nav a.active { color: var(--ink); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 7px 16px;
  border-radius: var(--r);
  font-size: .8rem !important;
  font-weight: 600 !important;
  transition: background .15s, transform .15s !important;
}
.nav-cta:hover { background: var(--accent2) !important; transform: translateY(-1px); }

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
  background: var(--ink);
  color: var(--white);
  padding: 80px 24px 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(0,87,255,.18), transparent),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(201,151,58,.12), transparent);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .4;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent);
  display: block;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 20px;
  max-width: 700px;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}
.hero-sub {
  font-size: 1rem;
  color: rgba(253,252,250,.65);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
  letter-spacing: .01em;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,87,255,.35); }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--white); border: 1px solid rgba(255,255,255,.15); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--border2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.hero-stat-val {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label {
  font-size: .72rem;
  color: rgba(253,252,250,.5);
  margin-top: 3px;
  font-family: var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ══════════════════════════════════
   SECTION WRAPPERS
══════════════════════════════════ */
.section { padding: 64px 24px; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-light { background: var(--white); }
.section-tinted { background: var(--surface); }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-label {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.view-all {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.view-all:hover { color: var(--accent2); }
.view-all::after { content: '→'; }

/* ══════════════════════════════════
   CATEGORIES
══════════════════════════════════ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.cat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all .18s;
  text-decoration: none;
}
.cat-pill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.cat-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
}
.cat-count {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 10px;
}

/* ══════════════════════════════════
   ARTICLE CARDS
══════════════════════════════════ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.articles-grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .2s;
}
.article-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card-image {
  height: 160px;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface2), var(--surface));
  font-size: 2rem;
  opacity: .4;
}
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-cat {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 500;
}
.card-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.015em;
  color: var(--ink);
  margin-bottom: 10px;
  flex: 1;
}
.card-title:hover { color: var(--accent); }
.card-excerpt {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: .7rem;
  color: var(--muted2);
  font-family: var(--mono);
}
.card-date { }
.card-read { color: var(--accent); font-weight: 500; }
.card-read:hover { color: var(--accent2); }

/* Featured card — larger */
.article-card.featured { grid-column: span 2; flex-direction: row; }
.article-card.featured .card-image { height: auto; width: 240px; flex-shrink: 0; }
.article-card.featured .card-title { font-size: 1.25rem; }

/* ══════════════════════════════════
   BLOG PAGE
══════════════════════════════════ */
.blog-header {
  background: var(--ink);
  color: var(--white);
  padding: 52px 24px;
}
.blog-header-inner { max-width: var(--max); margin: 0 auto; }
.blog-header-title {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -.03em;
  margin-bottom: 8px;
}
.blog-header-sub { color: rgba(253,252,250,.55); font-size: .9rem; }

.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 62px;
  z-index: 90;
  overflow-x: auto;
}
.filter-bar-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 0;
}
.filter-btn {
  padding: 14px 18px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all .15s;
  font-family: var(--sans);
}
.filter-btn:hover { color: var(--ink); }
.filter-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.blog-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.blog-main { }
.blog-sidebar { }

/* Sidebar */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-cats { list-style: none; }
.sidebar-cats li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
}
.sidebar-cats li:last-child { border: none; }
.sidebar-cats a { color: var(--ink); transition: color .15s; }
.sidebar-cats a:hover { color: var(--accent); }
.sidebar-cats span {
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--muted);
}

/* Newsletter widget */
.newsletter-widget {
  background: var(--accent);
  border-radius: var(--r);
  padding: 22px;
  color: white;
  margin-bottom: 20px;
}
.newsletter-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.newsletter-sub { font-size: .78rem; opacity: .85; margin-bottom: 14px; line-height: 1.5; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-input {
  padding: 9px 12px;
  border-radius: 5px;
  border: none;
  font-size: .82rem;
  font-family: var(--sans);
  outline: none;
  width: 100%;
}
.newsletter-submit {
  padding: 9px;
  background: var(--ink);
  color: white;
  border-radius: 5px;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--sans);
  transition: background .15s;
}
.newsletter-submit:hover { background: var(--ink2); }

/* ══════════════════════════════════
   ARTICLE / POST PAGE
══════════════════════════════════ */
.post-header {
  background: var(--ink);
  color: var(--white);
  padding: 60px 24px 52px;
  position: relative;
  overflow: hidden;
}
.post-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 100% at 90% 50%, rgba(0,87,255,.15), transparent);
  pointer-events: none;
}
.post-header-inner { max-width: 760px; margin: 0 auto; position: relative; }
.post-cat {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: inline-block;
  background: rgba(0,87,255,.15);
  padding: 3px 10px;
  border-radius: 3px;
}
.post-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.post-subtitle {
  font-size: 1rem;
  color: rgba(253,252,250,.65);
  line-height: 1.6;
  margin-bottom: 24px;
}
.post-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .75rem;
  color: rgba(253,252,250,.5);
  font-family: var(--mono);
  flex-wrap: wrap;
}
.post-byline span { display: flex; align-items: center; gap: 4px; }

.post-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 52px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  align-items: start;
}
.post-content {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--ink2);
}
.post-content h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 2.2em 0 .8em;
  color: var(--ink);
}
.post-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.8em 0 .6em;
  color: var(--ink);
}
.post-content p { margin-bottom: 1.4em; }
.post-content ul, .post-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}
.post-content li { margin-bottom: .5em; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--accent2); }
.post-content strong { font-weight: 600; color: var(--ink); }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 14px 20px;
  margin: 1.8em 0;
  background: var(--surface);
  border-radius: 0 var(--r) var(--r) 0;
  font-style: italic;
  color: var(--muted);
}
.post-content code {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 3px;
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: .88rem;
}
.post-content th {
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.post-content tr:nth-child(even) td { background: var(--surface); }

/* Key insight box */
.key-insight {
  background: linear-gradient(135deg, rgba(0,87,255,.06), rgba(0,87,255,.02));
  border: 1px solid rgba(0,87,255,.2);
  border-radius: var(--r);
  padding: 18px 22px;
  margin: 2em 0;
}
.key-insight-label {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.key-insight-text {
  font-size: .9rem;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 500;
}

/* Post sidebar / TOC */
.post-toc {
  position: sticky;
  top: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
}
.post-toc-title {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.post-toc ul { list-style: none; }
.post-toc li { margin-bottom: 8px; }
.post-toc a {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
  display: block;
  transition: color .15s;
  padding-left: 10px;
  border-left: 2px solid transparent;
}
.post-toc a:hover, .post-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* Tags */
.post-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2.5em;
  padding-top: 2em;
  border-top: 1px solid var(--border);
}
.tag {
  font-family: var(--mono);
  font-size: .65rem;
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ══════════════════════════════════
   COMPARISONS PAGE TEASER
══════════════════════════════════ */
.compare-strip {
  background: var(--ink2);
  color: var(--white);
  padding: 52px 24px;
}
.compare-strip-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.compare-strip-text .label { color: var(--accent); font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.compare-strip-text h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; }
.compare-strip-text p { color: rgba(253,252,250,.55); margin-top: 8px; font-size: .88rem; }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.site-footer {
  background: var(--ink);
  color: rgba(253,252,250,.6);
  padding: 52px 24px 32px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 28px;
}
.footer-brand .logo-mark { font-size: 1.15rem; color: var(--white); }
.footer-brand p {
  font-size: .8rem;
  line-height: 1.6;
  margin-top: 10px;
  max-width: 260px;
}
.footer-col-title {
  font-size: .72rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-family: var(--mono);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: .8rem; color: rgba(253,252,250,.5); transition: color .15s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .74rem;
}
.footer-bottom a { color: rgba(253,252,250,.4); }
.footer-bottom a:hover { color: rgba(253,252,250,.7); }
.affiliate-notice {
  font-size: .72rem;
  color: rgba(253,252,250,.3);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  line-height: 1.6;
}

/* ══════════════════════════════════
   UTILITIES
══════════════════════════════════ */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: .6rem;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge-blue { background: rgba(0,87,255,.1); color: var(--accent); border: 1px solid rgba(0,87,255,.2); }
.badge-gold { background: rgba(201,151,58,.1); color: var(--gold); border: 1px solid rgba(201,151,58,.2); }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 900px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-card.featured { grid-column: span 1; flex-direction: column; }
  .article-card.featured .card-image { width: 100%; height: 160px; }
  .blog-layout { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-toc { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .articles-grid { grid-template-columns: 1fr; }
  nav a:not(.nav-cta) { display: none; }
  .hero-stats { gap: 20px; }
  .footer-top { grid-template-columns: 1fr; }
}
