/* CheckinIQ blog stylesheet. Matches the landing page design system. */

:root {
  --brand-50: #EFF6FF;
  --brand-100: #DBEAFE;
  --brand-200: #BFDBFE;
  --brand-300: #93C5FD;
  --brand-400: #60A5FA;
  --brand-500: #3B82F6;
  --brand-600: #2563EB;
  --brand-700: #1D4ED8;
  --brand-800: #1E40AF;
  --brand-900: #1E3A8A;
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --amber-500: #F59E0B;
  --rose-500: #F43F5E;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* semantic tokens, light mode */
  --bg-body: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: var(--slate-50);
  --bg-surface-hover: var(--slate-100);
  --bg-nav: rgba(255,255,255,0.92);
  --bg-footer: var(--slate-900);
  --text-primary: var(--slate-900);
  --text-secondary: var(--slate-800);
  --text-body: var(--slate-700);
  --text-muted: var(--slate-500);
  --text-faint: var(--slate-400);
  --text-on-dark: var(--slate-300);
  --border-default: var(--slate-200);
  --border-strong: var(--slate-300);
  --code-bg: var(--slate-100);
  --callout-bg: var(--brand-50);
  --callout-text: var(--slate-700);
  --callout-accent: var(--brand-700);
  --blockquote-bg: var(--slate-50);
  --blockquote-text: var(--slate-600);
  --category-bg: var(--brand-50);
  --category-text: var(--brand-600);
  --category-compliance-bg: #FFF1F2;
  --category-compliance-text: var(--rose-500);
  --category-workforce-bg: #ECFDF5;
  --category-workforce-text: var(--emerald-600);
  --category-vertical-bg: #FFFBEB;
  --category-vertical-text: var(--amber-500);
  --header-gradient: linear-gradient(180deg, var(--slate-50) 0%, #FFFFFF 100%);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg-body: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-alt: #162032;
  --bg-surface-hover: #334155;
  --bg-nav: rgba(15,23,42,0.92);
  --bg-footer: #020617;
  --text-primary: #f8fafc;
  --text-secondary: #f1f5f9;
  --text-body: #e2e8f0;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --text-on-dark: #cbd5e1;
  --border-default: #334155;
  --border-strong: #475569;
  --code-bg: #334155;
  --callout-bg: rgba(37,99,235,0.12);
  --callout-text: #e2e8f0;
  --callout-accent: #93C5FD;
  --blockquote-bg: rgba(255,255,255,0.04);
  --blockquote-text: #cbd5e1;
  --category-bg: rgba(37,99,235,0.18);
  --category-text: #93C5FD;
  --category-compliance-bg: rgba(244,63,94,0.16);
  --category-compliance-text: #FDA4AF;
  --category-workforce-bg: rgba(16,185,129,0.16);
  --category-workforce-text: #6EE7B7;
  --category-vertical-bg: rgba(245,158,11,0.16);
  --category-vertical-text: #FCD34D;
  --header-gradient: linear-gradient(180deg, #162032 0%, var(--bg-body) 100%);
  color-scheme: dark;
}

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

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ─── NAV ─────────────────────────────── */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-default);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { height: 38px; display: block; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.925rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--brand-500); }
.nav-links a.active { color: var(--brand-500); }
.nav-cta {
  background: var(--brand-600) !important;
  color: white !important;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--brand-700) !important; transform: translateY(-1px); }

/* theme toggle */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--brand-400);
  color: var(--brand-500);
  background: var(--bg-surface-alt);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; line-height: 1; }
:root .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ─── BLOG HEADER ─────────────────────── */
.blog-header {
  padding: 96px 0 56px;
  background: var(--header-gradient);
  text-align: center;
}
.blog-header .eyebrow {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-500);
  margin-bottom: 16px;
}
.blog-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}
.blog-header .subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── BLOG INDEX GRID ─────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding: 48px 0 96px;
}
.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-400);
}
.blog-card .category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--category-text);
  background: var(--category-bg);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
  align-self: flex-start;
}
.blog-card .category.compliance { color: var(--category-compliance-text); background: var(--category-compliance-bg); }
.blog-card .category.workforce { color: var(--category-workforce-text); background: var(--category-workforce-bg); }
.blog-card .category.vertical { color: var(--category-vertical-text); background: var(--category-vertical-bg); }
.blog-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}
.blog-card p {
  color: var(--text-muted);
  font-size: 0.975rem;
  flex: 1;
}
.blog-card .meta {
  margin-top: 18px;
  font-size: 0.825rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 12px;
}
.blog-card .meta .dot { width: 3px; height: 3px; background: var(--border-strong); border-radius: 50%; }

/* ─── ARTICLE PAGE ────────────────────── */
.article-header {
  padding: 80px 0 40px;
  background: var(--header-gradient);
}
.article-header .breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.article-header .breadcrumb a {
  color: var(--brand-500);
  text-decoration: none;
}
.article-header .breadcrumb a:hover { text-decoration: underline; }
.article-header .category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--category-text);
  background: var(--category-bg);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.article-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 820px;
}
.article-header .lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 760px;
  margin-bottom: 24px;
}
.article-header .meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.article-header .meta .dot { width: 3px; height: 3px; background: var(--border-strong); border-radius: 50%; }

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--text-body);
}
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.25;
}
.article-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 12px;
  line-height: 1.3;
}
.article-body h4 {
  font-weight: 600;
  font-size: 1.075rem;
  color: var(--text-secondary);
  margin-top: 28px;
  margin-bottom: 10px;
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin-bottom: 18px; padding-left: 28px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text-primary); font-weight: 600; }
.article-body a { color: var(--brand-500); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--brand-400); }
.article-body blockquote {
  border-left: 4px solid var(--brand-500);
  padding: 8px 0 8px 20px;
  margin: 24px 0;
  color: var(--blockquote-text);
  font-style: italic;
  background: var(--blockquote-bg);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
.article-body th, .article-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-default);
}
.article-body th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface-alt);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-body code {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text-secondary);
}
.article-body hr { margin: 36px 0; border: 0; border-top: 1px solid var(--border-default); }

.article-body .callout {
  background: var(--callout-bg);
  border-left: 4px solid var(--brand-500);
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
  color: var(--callout-text);
}
.article-body .callout strong { color: var(--callout-accent); }

/* ─── ARTICLE CTA ─────────────────────── */
.article-cta {
  max-width: 760px;
  margin: 32px auto 64px;
  padding: 36px 32px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  border-radius: var(--radius-lg);
  color: white;
  text-align: center;
}
.article-cta h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.65rem;
  margin-bottom: 12px;
  color: white;
}
.article-cta p {
  color: rgba(255,255,255,0.92);
  margin-bottom: 24px;
  font-size: 1.05rem;
}
.article-cta a.btn-primary {
  display: inline-block;
  background: white;
  color: var(--brand-700);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.article-cta a.btn-primary:hover { transform: translateY(-1px); }
.article-cta .note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.78);
}

/* ─── FOOTER ──────────────────────────── */
footer.site-footer {
  background: var(--bg-footer);
  color: var(--text-on-dark);
  padding: 48px 0 32px;
}
footer.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
footer.site-footer .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
footer.site-footer .footer-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-family: var(--font-display);
}
footer.site-footer .footer-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
}
footer.site-footer .footer-copy { font-size: 0.875rem; color: var(--text-faint); }
footer.site-footer .footer-links { display: flex; gap: 20px; }
footer.site-footer .footer-links a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 0.875rem;
}
footer.site-footer .footer-links a:hover { color: white; }
