/* Blog post styles — business-process-automation-guide */

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

:root {
  --violet: #7C3AED;
  --violet-dark: #6D28D9;
  --violet-light: #8B5CF6;
  --indigo: #4F46E5;
  --acid: #A3E635;
  --acid-dark: #84CC16;
  --dark: #0a0a0b;
  --dark-card: #141416;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-400: #ADB5BD;
  --gray-600: #6C757D;
  --gray-800: #343A40;
  --white: #FFFFFF;
  --radius: 16px;
  --radius-btn: 100px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-xl: 0 25px 50px rgba(124,58,237,0.12), 0 10px 20px rgba(0,0,0,0.04);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Instrument Serif', Georgia, serif; line-height: 1.15; }

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

/* ============ NAVBAR ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
.nav.scrolled { padding: 10px 0; box-shadow: var(--shadow-sm); }
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 800; font-size: 1.5rem;
  color: var(--dark); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo .logo-icon {
  width: 32px; height: 32px; background: var(--violet);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.9rem; font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--gray-600); font-size: 0.9rem; font-weight: 500;
  transition: color 0.3s; position: relative;
}
.nav-links a:hover { color: var(--violet); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--violet); transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--violet); }
.nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--violet); color: white !important; padding: 10px 24px;
  border-radius: var(--radius-btn); font-weight: 600 !important; font-size: 0.85rem !important;
  transition: all 0.3s !important;
}
.nav-cta:hover { background: var(--violet-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,0.3); }
.nav-cta::after { display: none !important; }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--dark); margin: 6px 0; transition: all 0.3s; border-radius: 2px; }
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============ MOBILE MENU ============ */
.mobile-menu {
  display: none; position: fixed; top: 65px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
  padding: 24px; z-index: 999; overflow-y: auto;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
  display: block; padding: 14px 16px; font-size: 1rem; font-weight: 500;
  color: var(--dark); text-decoration: none; border-radius: 10px;
  transition: background 0.15s;
}
.mobile-menu a:hover { background: rgba(124,58,237,0.04); color: var(--violet); }
.mobile-cta {
  display: block; text-align: center; margin-top: 16px;
  background: var(--violet); color: var(--white) !important; padding: 14px 24px;
  border-radius: var(--radius-btn); font-weight: 600;
}

/* ============ BLOBS ============ */
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.18;
  animation: morph 15s ease-in-out infinite alternate;
  pointer-events: none;
}
.blob-1 {
  width: 500px; height: 500px; top: -80px; right: -80px;
  background: var(--violet); animation-delay: 0s;
}
.blob-2 {
  width: 400px; height: 400px; bottom: -40px; left: -80px;
  background: var(--indigo); opacity: 0.12; animation-delay: -5s;
  animation-direction: alternate-reverse;
}
@keyframes morph {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0, 0) scale(1); }
  25%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: translate(50px, -30px) scale(1.1); }
  50%  { border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%; transform: translate(-20px, 40px) scale(0.95); }
  75%  { border-radius: 40% 60% 50% 40% / 60% 50% 40% 60%; transform: translate(30px, 20px) scale(1.05); }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: translate(0, 0) scale(1); }
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ ARTICLE LAYOUT ============ */
.article-wrapper {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px) 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ ARTICLE HEADER ============ */
.article-hero {
  position: relative;
  padding: 120px 24px 48px;
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
}

.breadcrumb {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85rem;
  color: var(--gray-400); margin-bottom: 24px;
}
.breadcrumb a { color: var(--gray-600); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--violet); }
.breadcrumb span { margin: 0 8px; }

.article-category {
  display: inline-block; padding: 6px 16px; border-radius: var(--radius-btn);
  background: rgba(124,58,237,0.08); border: 1px solid rgba(124,58,237,0.15);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem; font-weight: 600; color: var(--violet);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 20px;
}

.article-hero h1 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 3.5rem); line-height: 1.15;
  letter-spacing: -0.03em; color: var(--dark); margin-bottom: 20px;
}
.article-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-meta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 0.9rem; color: var(--gray-400);
  padding-bottom: 32px; border-bottom: 1px solid var(--gray-100);
}
.article-meta .meta-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gray-200); }

/* ============ TABLE OF CONTENTS ============ */
.toc {
  position: sticky; top: 100px; align-self: start;
  padding-top: 32px;
}
.toc-label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gray-400); margin-bottom: 16px;
}
.toc a {
  display: block; font-size: 0.85rem; color: var(--gray-400);
  text-decoration: none; padding: 6px 0; line-height: 1.4;
  border-left: 2px solid transparent; padding-left: 12px;
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover, .toc a.active {
  color: var(--violet); border-left-color: var(--violet);
}

/* ============ ARTICLE CONTENT ============ */
.article-content {
  padding: 48px 0 80px;
}
.article-content h2 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.2;
  letter-spacing: -0.02em; color: var(--dark);
  margin-top: 56px; margin-bottom: 20px;
  padding-top: 24px; border-top: 1px solid var(--gray-100);
}
.article-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.article-content h3 {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 1.3rem; font-weight: 700;
  color: var(--dark); margin-top: 36px; margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.article-content p {
  font-size: 1.05rem; line-height: 1.8; color: var(--gray-600);
  margin-bottom: 20px;
}

.article-content ul, .article-content ol {
  margin-bottom: 20px; padding-left: 24px;
}
.article-content li {
  font-size: 1.05rem; line-height: 1.8; color: var(--gray-600);
  margin-bottom: 8px;
}

.article-content strong { color: var(--dark); font-weight: 600; }

.article-content a {
  color: var(--violet); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: rgba(124,58,237,0.3);
  transition: text-decoration-color 0.2s;
}
.article-content a:hover { text-decoration-color: var(--violet); }

.article-content blockquote {
  border-left: 3px solid var(--violet); padding: 16px 24px;
  margin: 28px 0; background: rgba(124,58,237,0.03);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-content blockquote p { margin-bottom: 0; font-style: italic; color: var(--gray-600); }

/* Definition box for featured snippet */
.definition-box {
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius); padding: 28px 32px; margin-bottom: 32px;
  border-left: 4px solid var(--violet);
}
.definition-box p { margin-bottom: 0; font-size: 1.1rem; line-height: 1.7; color: var(--gray-600); }

/* Comparison table */
.comparison-table {
  width: 100%; border-collapse: collapse; margin: 28px 0 32px;
  font-size: 0.95rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--gray-100);
}
.comparison-table thead { background: var(--dark); }
.comparison-table th {
  padding: 14px 16px; text-align: left; font-weight: 600;
  color: var(--gray-50); font-size: 0.9rem; letter-spacing: 0.02em;
}
.comparison-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600); line-height: 1.5;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: rgba(124,58,237,0.02); }
.comparison-table .row-label { font-weight: 600; color: var(--dark); }

/* Decision framework */
.framework-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0 32px;
}
.framework-card {
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius); padding: 24px;
  transition: all 0.3s ease;
}
.framework-card:hover { border-color: rgba(124,58,237,0.2); box-shadow: var(--shadow-sm); }
.framework-card h4 {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 1rem; font-weight: 700;
  color: var(--dark); margin-bottom: 8px;
}
.framework-card p { font-size: 0.9rem; line-height: 1.6; color: var(--gray-600); margin-bottom: 0; }
.framework-card .score {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem; font-weight: 600;
  color: var(--violet); margin-top: 10px; display: block;
}

/* Stats callout */
.stat-callout {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 28px 0 32px;
}
.stat-card {
  text-align: center; padding: 28px 16px;
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}
.stat-card:hover { border-color: rgba(124,58,237,0.2); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.stat-card .stat-number {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 2.8rem; font-weight: 800;
  color: var(--violet); line-height: 1;
}
.stat-card .stat-label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gray-400); margin-top: 8px;
}

/* Step cards */
.step-cards { margin: 24px 0 32px; }
.step-card {
  display: flex; gap: 20px; padding: 24px;
  background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius); margin-bottom: 12px;
  transition: all 0.3s ease;
}
.step-card:hover { border-color: rgba(124,58,237,0.2); box-shadow: var(--shadow-sm); }
.step-number {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 2.5rem; font-weight: 800;
  color: var(--violet); line-height: 1; flex-shrink: 0;
}
.step-card h4 {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 1.1rem; font-weight: 700;
  color: var(--dark); margin-bottom: 6px;
}
.step-card p { font-size: 0.95rem; line-height: 1.6; color: var(--gray-600); margin-bottom: 0; }

/* Functions list */
.functions-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 32px;
}
.function-item {
  padding: 20px; background: var(--gray-50); border: 1px solid var(--gray-100);
  border-radius: var(--radius); transition: all 0.3s ease;
}
.function-item:hover { border-color: rgba(124,58,237,0.2); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.function-item h4 {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 1rem; font-weight: 700;
  color: var(--dark); margin-bottom: 6px;
}
.function-item p { font-size: 0.9rem; line-height: 1.5; color: var(--gray-600); margin-bottom: 0; }
.function-item .fn-metric {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8rem; font-weight: 600;
  color: var(--violet); margin-top: 8px; display: block;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--gray-100);
  padding: 24px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 1.2rem; font-weight: 700;
  color: var(--dark); margin-bottom: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--violet); flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-q::after { content: '\2212'; }
.faq-a {
  font-size: 1rem; line-height: 1.7; color: var(--gray-600);
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.faq-item.open .faq-a { max-height: 400px; }

/* ============ CTA SECTION ============ */
.cta-section {
  text-align: center; padding: 100px 24px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(163,230,53,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(79,70,229,0.3) 0%, transparent 50%);
}
.cta-section .cta-inner { position: relative; z-index: 2; }
.cta-section h2 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15;
  color: var(--white); margin-bottom: 16px;
}
.cta-section h2 em {
  font-style: normal; color: var(--acid);
}
.cta-section p {
  font-size: 1.1rem; color: rgba(255,255,255,0.8); max-width: 520px;
  margin: 0 auto 32px; line-height: 1.6;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 36px; border-radius: var(--radius-btn);
  background: var(--white); color: var(--violet);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cta-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(0,0,0,0.25); }
.cta-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 36px; border-radius: var(--radius-btn);
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: all 0.3s; margin-left: 12px;
}
.cta-ghost:hover { border-color: var(--acid); color: var(--acid); }

/* Industries pills in article */
.industry-pills {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 32px;
}
.industry-pill-sm {
  padding: 8px 16px; border-radius: var(--radius-btn);
  background: var(--gray-50); border: 1px solid var(--gray-100);
  font-size: 0.9rem; font-weight: 500; color: var(--gray-600);
  transition: all 0.2s ease;
}
.industry-pill-sm:hover { border-color: rgba(124,58,237,0.2); color: var(--violet); }

/* ============ FOOTER ============ */
.footer {
  background: var(--dark); padding: 80px 0 40px; color: rgba(255,255,255,0.5);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 60px;
}
.footer-brand .nav-logo { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.65; max-width: 280px; }
.footer-col h4 {
  font-family: 'Instrument Serif', Georgia, serif; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.45); text-decoration: none;
  font-size: 0.9rem; padding: 6px 0; transition: color 0.3s;
}
.footer-col a:hover { color: var(--acid); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 32px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .article-wrapper {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 24px;
  }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .article-hero { padding: 88px 20px 32px; }
  .article-wrapper { padding: 0 20px; }
  .article-content h2 { font-size: 1.5rem; }
  .comparison-table { font-size: 0.85rem; }
  .comparison-table th, .comparison-table td { padding: 10px; }
  .stat-callout { grid-template-columns: 1fr; }
  .framework-grid { grid-template-columns: 1fr; }
  .functions-grid { grid-template-columns: 1fr; }
  .cta-section { padding: 60px 20px; }
  .cta-ghost { margin-left: 0; margin-top: 12px; }
  .footer { padding: 48px 0 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .step-card { flex-direction: column; gap: 12px; }
}