/* SmartBuyAlways — smartbuyalways.com
   Independent marketing & CRM buyer’s guides. Clean, professional, mobile-first. */

:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --text: #142033;
  --text-muted: #5a6577;
  --border: #e0e5ee;
  --accent: #0a7a58;
  --accent-hover: #086348;
  --accent-soft: #e6f6ef;
  --brand: #0a7a58;
  --warning-bg: #fff8e6;
  --warning-border: #e6c86a;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 32, 51, 0.06), 0 6px 20px rgba(20, 32, 51, 0.05);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 720px;
  --max-wide: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-hover); }

/* —— Layout —— */
.wrap {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(10, 122, 88, 0.08);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
}
.logo {
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.logo::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.45rem;
  margin-bottom: 0.08rem;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--brand), #1bb07a);
  vertical-align: middle;
}
.logo span {
  display: block;
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.18rem;
  margin-left: 1rem;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover { color: var(--accent); }

/* —— Disclosure banner —— */
.disclosure-banner {
  background: var(--warning-bg);
  border-bottom: 1px solid var(--warning-border);
  font-size: 0.875rem;
  color: #5c4a12;
  padding: 0.65rem 0;
}
.disclosure-banner .wrap {
  width: min(100% - 2rem, var(--max-wide));
}
.disclosure-banner a { color: #7a5c10; font-weight: 600; }

/* —— Hero —— */
.hero {
  padding: 3.25rem 0 2.5rem;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.hero .lede {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 0 1.5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* —— Sections —— */
.section {
  padding: 2.5rem 0;
}
.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.section-sub {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  max-width: 36rem;
}

/* —— Cards —— */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.card h3 a {
  color: var(--text);
  text-decoration: none;
}
.card h3 a:hover { color: var(--accent); }
.card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}
.card .meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}
.card .read-more {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.card .read-more::after { content: " →"; }

.niche-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.niche-strip h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.niche-strip p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* —— Article —— */
.article-header {
  padding: 2.5rem 0 1.25rem;
}
.article-header h1 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(1.65rem, 3.5vw, 2.15rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.byline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}
.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}
.article-body h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}
.article-body p { margin: 0 0 1rem; }
.article-body ul, .article-body ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}
.article-body li { margin-bottom: 0.4rem; }
.article-body li::marker { color: var(--accent); }

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}
.callout strong { color: var(--accent-hover); }

.note-light {
  background: #f0f2f6;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 1rem 0;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  display: block;
}
table.compare thead { background: #f0f3f7; }
table.compare th, table.compare td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  min-width: 120px;
}
table.compare th { font-weight: 600; }

.cta-box {
  background: var(--accent-soft);
  border: 1px solid #b8dfd0;
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
}
.cta-box h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.cta-box p { margin: 0 0 1rem; font-size: 0.95rem; color: var(--text-muted); }
.cta-box .btn { margin-right: 0.5rem; margin-bottom: 0.4rem; }

.faq details {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  background: #fafbfc;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+ ";
  color: var(--accent);
  font-weight: 700;
}
.faq details[open] summary::before { content: "− "; }
.faq details p {
  margin: 0.65rem 0 0.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* —— About / static pages —— */
.page-header {
  padding: 2.5rem 0 1rem;
}
.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  letter-spacing: -0.025em;
}
.page-header .lede {
  color: var(--text-muted);
  margin: 0;
  max-width: 36rem;
}
.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}
.prose h2 {
  margin: 1.75rem 0 0.65rem;
  font-size: 1.25rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.3rem; }

/* —— Footer —— */
.site-footer {
  background: #142033;
  color: #c5cedb;
  padding: 2.5rem 0 2rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.site-footer a { color: #9fd4bf; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
  margin-bottom: 1.75rem;
}
.site-footer h4 {
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin-bottom: 0.4rem; }
.footer-legal {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
  padding-top: 1.25rem;
  border-top: 1px solid #2a3a52;
  font-size: 0.82rem;
  color: #8a97ab;
}
.footer-legal p { margin: 0 0 0.5rem; }
.footer-note {
  width: min(100% - 2rem, var(--max-wide));
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid #2a3a52;
  font-size: 0.82rem;
  color: #8a97ab;
}

/* —— Utilities —— */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 640px) {
  .site-header .inner { flex-direction: column; align-items: flex-start; }
  .nav { gap: 0.35rem 0.85rem; }
  .hero { padding-top: 2rem; }
}
