/* =============================================
   BLOG STYLES
   Extends landing.css + use-case.css
   ============================================= */

/* ---- Blog Hub ---- */

.blog-header {
  text-align: center;
  padding: 16px 0 64px;
}

.blog-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin: 16px 0 20px;
  line-height: 1.1;
}

.blog-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ---- Blog grid ---- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

/* ---- Blog card ---- */

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.blog-card-featured {
  border-color: rgba(0, 232, 123, 0.2);
  background: linear-gradient(135deg, var(--surface) 60%, rgba(0, 232, 123, 0.04));
}

.blog-card-featured:hover {
  border-color: rgba(0, 232, 123, 0.4);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.blog-tag {
  background: var(--green-dim);
  color: var(--green);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.blog-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.blog-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: var(--green);
}

.blog-card-excerpt {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.blog-read-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}

.blog-read-more:hover {
  gap: 8px;
}

/* ---- Bottom CTA box ---- */

.blog-cta-box {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 32px;
  margin-top: 16px;
}

.blog-cta-box p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ---- Article layout ---- */

.article-layout {
  max-width: 780px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 48px;
}

.article-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 16px 0 20px;
  line-height: 1.1;
}

.article-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 680px;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-sep {
  color: var(--border-light);
}

/* ---- Article body ---- */

.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 56px 0 20px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.article-body h2:first-child {
  border-top: none;
  margin-top: 8px;
}

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul {
  margin: 0 0 24px 0;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-body li {
  line-height: 1.7;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

.article-body a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: rgba(0, 232, 123, 0.3);
  transition: text-decoration-color 0.2s;
}

.article-body a:hover {
  text-decoration-color: var(--green);
}

/* ---- Tile grid (in article) ---- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.tile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.2s;
}

.tile-card:hover {
  border-color: var(--border-light);
}

.tile-agent    { border-left: 3px solid var(--green);  }
.tile-decision { border-left: 3px solid var(--amber);  }
.tile-handoff  { border-left: 3px solid var(--purple); }
.tile-checkpoint { border-left: 3px solid var(--pink); }

.tile-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  padding-top: 2px;
}

.tile-info strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.tile-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ---- Article CTA ---- */

.article-cta {
  background: linear-gradient(135deg, var(--surface), rgba(0, 232, 123, 0.05));
  border: 1px solid rgba(0, 232, 123, 0.2);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  margin: 56px 0 48px;
}

.article-cta h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.article-cta p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-large {
  padding: 16px 36px;
  font-size: 1rem;
}

/* ---- Related links sidebar ---- */

.article-related {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.article-related h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.related-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  transition: border-color 0.2s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}

.related-card:hover {
  border-color: var(--border-light);
  transform: translateX(4px);
}

.related-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.related-card strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.related-card p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ---- Footer ---- */

.footer {
  margin-top: 80px;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.logo-footer {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.logo-footer:hover { opacity: 1; }

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---- Chip variants ---- */

.chip-green {
  display: inline-flex;
  align-items: center;
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0, 232, 123, 0.2);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---- Blog Email Capture CTA (articles) ---- */

.blog-email-cta {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.07), rgba(139, 92, 246, 0.03));
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 20px;
  padding: 40px 40px 36px;
  margin: 0 0 48px;
  text-align: center;
}

.blog-email-cta-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b5cf6;
  margin-bottom: 12px;
}

.blog-email-cta h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.25;
}

.blog-email-cta-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.blog-email-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

.blog-email-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.blog-email-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.blog-email-input:focus {
  border-color: #8b5cf6;
}

.blog-email-btn {
  padding: 12px 22px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-email-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.blog-email-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.blog-email-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #00e87b;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 0;
}

.blog-email-success-icon {
  width: 22px;
  height: 22px;
  background: rgba(0, 232, 123, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* ---- Blog Hub Email Banner ---- */

.blog-hub-email-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.07), rgba(0, 232, 123, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  padding: 32px 36px;
  margin: 0 0 48px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.blog-hub-email-banner-text {
  flex: 1;
}

.blog-hub-email-banner-text strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.blog-hub-email-banner-text span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.blog-hub-email-form {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.blog-hub-email-input {
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 9px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  width: 220px;
  outline: none;
  transition: border-color 0.2s;
}

.blog-hub-email-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.blog-hub-email-input:focus {
  border-color: #8b5cf6;
}

.blog-hub-email-btn {
  padding: 11px 20px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.blog-hub-email-btn:hover {
  opacity: 0.9;
}

.blog-hub-email-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.blog-hub-email-success {
  display: none;
  align-items: center;
  gap: 8px;
  color: #00e87b;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ---- Above-fold Teaser CTA ---- */

.cta-teaser {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(0, 232, 123, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cta-teaser-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cta-teaser-text strong {
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.cta-teaser-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 16px;
  border-radius: 8px;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
  flex-shrink: 0;
}

.cta-teaser-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none !important;
  color: #fff !important;
}

/* ---- Mid-article contextual CTA ---- */

.cta-mid {
  background: rgba(139, 92, 246, 0.05);
  border-left: 3px solid #8b5cf6;
  border-radius: 0 8px 8px 0;
  padding: 12px 18px;
  margin: 8px 0 32px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cta-mid a {
  color: #8b5cf6 !important;
  font-weight: 600;
  text-decoration: none !important;
}

.cta-mid a:hover {
  text-decoration: underline !important;
}

/* ---- Rich bottom CTA with animated editor preview ---- */

.article-cta-rich {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(0, 232, 123, 0.04));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  margin: 56px 0 48px;
}

.cta-editor-preview {
  margin: 0 auto 28px;
  max-width: 460px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: #0d0d16;
}

.editor-preview-svg {
  width: 100%;
  height: 140px;
  display: block;
}

/* Node pulse animation */
@keyframes nodePulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes flowDash {
  to { stroke-dashoffset: -20; }
}

@keyframes dotFlow {
  0%   { opacity: 0; offset-distance: 0%; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; offset-distance: 100%; }
}

.preview-node {
  animation: nodePulse 2.5s ease-in-out infinite;
}

.preview-node:nth-child(2) { animation-delay: 0.4s; }
.preview-node:nth-child(3) { animation-delay: 0.8s; }
.preview-node:nth-child(4) { animation-delay: 1.2s; }

.preview-flow {
  animation: flowDash 1.2s linear infinite;
  stroke-dasharray: 6 4;
}

.article-cta-rich h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.25;
}

.article-cta-rich .cta-subtext {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.btn-purple {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-purple:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

/* ---- Blog hub featured CTA card ---- */

.blog-hub-cta {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(0, 232, 123, 0.05) 100%);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 20px;
  padding: 36px 40px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.blog-hub-cta-content {
  flex: 1;
}

.blog-hub-cta-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b5cf6;
  margin-bottom: 8px;
  display: block;
}

.blog-hub-cta h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}

.blog-hub-cta p {
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.blog-hub-cta-preview {
  flex-shrink: 0;
  width: 220px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: #0d0d16;
}

/* ---- Comparison table ---- */

.comparison-table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 560px;
}

.comparison-table thead th {
  background: rgba(139, 92, 246, 0.07);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th:first-child {
  width: 28%;
}

.comparison-table thead th:nth-child(2) {
  color: var(--muted);
}

.comparison-table thead th:nth-child(3) {
  color: #8b5cf6;
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.comparison-table tbody tr:last-child {
  border-bottom: none;
}

.comparison-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table tbody td {
  padding: 14px 18px;
  vertical-align: top;
  line-height: 1.55;
  color: var(--text-secondary);
}

.comparison-table tbody td:first-child {
  color: var(--text);
}

.comparison-table tbody td strong {
  font-weight: 600;
  color: var(--text);
}

/* ---- Related article link ---- */

.related-article {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .tile-grid {
    grid-template-columns: 1fr;
  }

  .article-cta {
    padding: 32px 24px;
  }

  .article-cta h3 {
    font-size: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .blog-email-cta {
    padding: 28px 20px 24px;
  }

  .blog-email-cta h3 {
    font-size: 1.2rem;
  }

  .blog-email-form {
    flex-direction: column;
  }

  .blog-hub-email-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }

  .blog-hub-email-form {
    width: 100%;
  }

  .blog-hub-email-input {
    width: 100%;
    flex: 1;
  }

  .article-cta-rich {
    padding: 32px 24px;
  }

  .article-cta-rich h3 {
    font-size: 1.25rem;
  }

  .cta-teaser {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cta-teaser-link {
    align-self: stretch;
    justify-content: center;
  }

  .blog-hub-cta {
    flex-direction: column;
    gap: 20px;
    padding: 28px 24px;
  }

  .blog-hub-cta-preview {
    width: 100%;
  }
}
