/*
Theme Name: Merkflow
Theme URI: https://merkflow.eu
Author: Merkflow
Author URI: https://merkflow.eu
Description: Custom marketing theme for merkflow.eu. Minimal, fast, on-brand.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary
License URI: https://merkflow.eu
Text Domain: merkflow
Tags: one-column, custom-colors, custom-logo, custom-menu, featured-images, full-width-template

Fonts: Fraunces (headings), DM Sans (body)
Palette: Accent #e8540a, Midnight #1a1814, Cloud #faf9f7
*/

/* ===================================================================
   DESIGN TOKENS
   =================================================================== */
:root {
  --mf-accent: #e8540a;
  --mf-accent-hover: #d44a07;
  --mf-accent-light: #fef0e9;
  --mf-midnight: #1a1814;
  --mf-cloud: #faf9f7;
  --mf-white: #ffffff;
  --mf-text: #1a1814;
  --mf-text-secondary: #6b6660;
  --mf-text-muted: #a09b95;
  --mf-border: #e5e2db;
  --mf-sidebar-bg: #f3f1ed;
  --mf-radius-sm: 8px;
  --mf-radius: 12px;
  --mf-radius-lg: 16px;
  --mf-shadow: 0 1px 3px rgba(26,24,20,0.06);
  --mf-shadow-lg: 0 8px 32px rgba(26,24,20,0.10);
  --mf-transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --mf-font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --mf-font-heading: 'Fraunces', Georgia, serif;
}

/* ===================================================================
   RESET + BASE
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--mf-font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--mf-text);
  background: var(--mf-cloud);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mf-font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--mf-midnight);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 16px; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--mf-accent);
  text-decoration: none;
  transition: color var(--mf-transition);
}
a:hover { color: var(--mf-accent-hover); }

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

ul, ol { padding-left: 1.5em; }

strong { font-weight: 600; }

::selection {
  background: var(--mf-accent);
  color: #fff;
}

/* ===================================================================
   LAYOUT
   =================================================================== */
.site-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.site-container--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.site-container--wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

/* ===================================================================
   HEADER
   =================================================================== */
.site-header {
  background: var(--mf-midnight);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--mf-transition), padding var(--mf-transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.site-header .site-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.site-header .logo {
  flex-shrink: 0;
}

.site-header .logo a {
  display: flex;
  align-items: center;
}

.site-header .logo img {
  height: 32px;
  width: auto;
}

/* Primary navigation */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.primary-nav .nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
}

.primary-nav .nav-links li {
  list-style: none;
}

.primary-nav .nav-links a {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--mf-radius-sm);
  transition: color var(--mf-transition), background var(--mf-transition);
  white-space: nowrap;
}

.primary-nav .nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.primary-nav .nav-links .current-menu-item a,
.primary-nav .nav-links .current_page_item a {
  color: #fff;
}

/* Header CTA buttons */
.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: var(--mf-radius);
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  cursor: pointer;
  transition: all var(--mf-transition);
  text-decoration: none;
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mf-accent);
  color: #fff;
  font-family: var(--mf-font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 24px;
  border-radius: var(--mf-radius);
  border: none;
  cursor: pointer;
  transition: background var(--mf-transition), transform var(--mf-transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-cta:hover {
  background: var(--mf-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-cta--large {
  font-size: 17px;
  padding: 14px 32px;
  border-radius: var(--mf-radius);
}

.btn-cta--outline {
  background: transparent;
  color: var(--mf-accent);
  border: 2px solid var(--mf-accent);
}

.btn-cta--outline:hover {
  background: var(--mf-accent);
  color: #fff;
}

.btn-cta--white {
  background: #fff;
  color: var(--mf-midnight);
}

.btn-cta--white:hover {
  background: var(--mf-cloud);
  color: var(--mf-midnight);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 6px 0;
  transition: all var(--mf-transition);
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile nav overlay — hidden by default, shown via JS toggle on mobile */
.mobile-nav {
  display: none;
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero {
  background: var(--mf-midnight);
  padding: 100px 0 120px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(232,84,10,0.15) 0%, rgba(232,84,10,0.05) 40%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  color: #fff;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.hero h1 .accent {
  color: var(--mf-accent);
}

.hero p {
  font-size: clamp(18px, 2.2vw, 22px);
  color: rgba(255,255,255,0.65);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.hero .hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero .hero-subtext {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

/* ===================================================================
   STATS BAR
   =================================================================== */
.stats-bar {
  background: var(--mf-white);
  border-bottom: 1px solid var(--mf-border);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item .stat-number {
  font-family: var(--mf-font-heading);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 900;
  color: var(--mf-accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-item .stat-label {
  font-size: 15px;
  color: var(--mf-text-secondary);
  font-weight: 500;
}

/* ===================================================================
   SECTIONS
   =================================================================== */
.section {
  padding: 96px 0;
}

.section--alt {
  background: var(--mf-white);
}

.section--dark {
  background: var(--mf-midnight);
  color: rgba(255,255,255,0.7);
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-header .section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mf-accent);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 18px;
  color: var(--mf-text-secondary);
  margin-top: 16px;
}

/* ===================================================================
   PROBLEM / SOLUTION
   =================================================================== */
.problem-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.problem-card,
.solution-card {
  padding: 40px;
  border-radius: var(--mf-radius-lg);
}

.problem-card {
  background: #fff;
  border: 1px solid var(--mf-border);
}

.solution-card {
  background: var(--mf-midnight);
  color: rgba(255,255,255,0.8);
}

.solution-card h3 {
  color: #fff;
}

.problem-card h3,
.solution-card h3 {
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.problem-card ul,
.solution-card ul {
  list-style: none;
  padding: 0;
}

.problem-card ul li,
.solution-card ul li {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  font-size: 16px;
  line-height: 1.5;
}

.problem-card ul li::before {
  content: '\2717';
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: 700;
}

.solution-card ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--mf-accent);
  font-weight: 700;
}

/* ===================================================================
   HOW IT WORKS
   =================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: step-counter;
}

.step-card {
  text-align: center;
  padding: 40px 24px;
  counter-increment: step-counter;
}

.step-card .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mf-accent-light);
  color: var(--mf-accent);
  font-family: var(--mf-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.step-card h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.step-card p {
  color: var(--mf-text-secondary);
  font-size: 16px;
}

/* ===================================================================
   FEATURES GRID
   =================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--mf-white);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius);
  padding: 32px;
  transition: border-color var(--mf-transition), transform var(--mf-transition);
}

.feature-card:hover {
  border-color: var(--mf-accent);
  transform: translateY(-2px);
}

.feature-card .feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.feature-card p {
  color: var(--mf-text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

/* ===================================================================
   PRICING TABLE
   =================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--mf-white);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-lg);
  padding: 40px 32px;
  position: relative;
  transition: transform var(--mf-transition), box-shadow var(--mf-transition);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--mf-shadow-lg);
}

.pricing-card--featured {
  border: 2px solid var(--mf-accent);
  transform: scale(1.03);
}

.pricing-card--featured:hover {
  transform: scale(1.03) translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mf-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-card .pricing-tier {
  font-family: var(--mf-font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mf-midnight);
  margin-bottom: 8px;
}

.pricing-card .pricing-price {
  font-family: var(--mf-font-heading);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--mf-midnight);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card .pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--mf-text-secondary);
}

.pricing-card .pricing-desc {
  font-size: 15px;
  color: var(--mf-text-secondary);
  margin-bottom: 24px;
  line-height: 1.4;
}

.pricing-card .pricing-features {
  list-style: none;
  padding: 0;
  margin-bottom: 32px;
}

.pricing-card .pricing-features li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 15px;
  color: var(--mf-text);
  border-bottom: 1px solid var(--mf-border);
}

.pricing-card .pricing-features li:last-child {
  border-bottom: none;
}

.pricing-card .pricing-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--mf-accent);
  font-weight: 700;
}

.pricing-card .btn-cta {
  width: 100%;
  justify-content: center;
}

/* ===================================================================
   TESTIMONIALS
   =================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--mf-white);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius);
  padding: 32px;
}

.testimonial-card .testimonial-text {
  font-size: 16px;
  font-style: italic;
  color: var(--mf-text);
  margin-bottom: 20px;
  line-height: 1.6;
}

.testimonial-card .testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card .testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mf-accent-light);
  color: var(--mf-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.testimonial-card .testimonial-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--mf-midnight);
}

.testimonial-card .testimonial-role {
  font-size: 13px;
  color: var(--mf-text-muted);
}

/* ===================================================================
   BLOG PREVIEW
   =================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--mf-white);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius);
  overflow: hidden;
  transition: transform var(--mf-transition), box-shadow var(--mf-transition);
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--mf-shadow-lg);
}

.blog-card .blog-card-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--mf-sidebar-bg);
}

.blog-card .blog-card-body {
  padding: 24px;
}

.blog-card .blog-card-meta {
  font-size: 13px;
  color: var(--mf-text-muted);
  margin-bottom: 8px;
}

.blog-card .blog-card-title {
  font-family: var(--mf-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--mf-midnight);
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-card .blog-card-title a {
  color: inherit;
}

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

.blog-card .blog-card-excerpt {
  font-size: 15px;
  color: var(--mf-text-secondary);
  line-height: 1.5;
}

/* ===================================================================
   FINAL CTA
   =================================================================== */
.final-cta {
  background: var(--mf-midnight);
  padding: 96px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,84,10,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta h2 {
  color: #fff;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.final-cta p {
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  max-width: 550px;
  margin: 0 auto 32px;
  position: relative;
  z-index: 1;
}

.final-cta .btn-cta {
  position: relative;
  z-index: 1;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  background: var(--mf-midnight);
  color: rgba(255,255,255,0.5);
  padding: 64px 0 32px;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .footer-logo {
  margin-bottom: 16px;
}

.footer-brand .footer-logo img {
  height: 28px;
  width: auto;
}

.footer-brand p {
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  color: rgba(255,255,255,0.9);
  font-family: var(--mf-font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  transition: color var(--mf-transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: rgba(255,255,255,0.35);
  font-size: 13px;
  margin: 0;
}

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

.footer-bottom-links a {
  color: rgba(255,255,255,0.35);
  font-size: 13px;
}

.footer-bottom-links a:hover {
  color: rgba(255,255,255,0.7);
}

/* ===================================================================
   BLOG INDEX + SINGLE
   =================================================================== */
.blog-index-header {
  padding: 64px 0 48px;
  text-align: center;
  background: var(--mf-white);
  border-bottom: 1px solid var(--mf-border);
}

.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding: 48px 0;
}

.blog-content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 48px 0;
}

.blog-content-wrap.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

/* Single post */
.single-header {
  padding: 64px 0 32px;
  text-align: center;
  background: var(--mf-white);
  border-bottom: 1px solid var(--mf-border);
}

.single-header .post-meta {
  font-size: 14px;
  color: var(--mf-text-muted);
  margin-bottom: 16px;
}

.single-header h1 {
  max-width: 700px;
  margin: 0 auto;
}

.single-featured-image {
  max-width: 800px;
  margin: -32px auto 0;
  border-radius: var(--mf-radius);
  overflow: hidden;
  box-shadow: var(--mf-shadow-lg);
  position: relative;
  z-index: 1;
}

.single-content {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

.single-content h2 { margin-top: 40px; margin-bottom: 16px; }
.single-content h3 { margin-top: 32px; margin-bottom: 12px; }
.single-content p { margin-bottom: 1.5em; }
.single-content ul, .single-content ol { margin-bottom: 1.5em; }
.single-content blockquote {
  border-left: 3px solid var(--mf-accent);
  padding-left: 20px;
  margin: 2em 0;
  font-style: italic;
  color: var(--mf-text-secondary);
}
.single-content code {
  background: var(--mf-sidebar-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.single-content pre {
  background: var(--mf-midnight);
  color: rgba(255,255,255,0.85);
  padding: 24px;
  border-radius: var(--mf-radius);
  overflow-x: auto;
  margin-bottom: 1.5em;
}
.single-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.single-content img {
  border-radius: var(--mf-radius-sm);
  margin: 1.5em 0;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--mf-border);
  margin-top: 48px;
}

.post-nav a {
  font-size: 15px;
  font-weight: 500;
}

/* ===================================================================
   SIDEBAR
   =================================================================== */
.sidebar {
  position: sticky;
  top: 96px;
}

.sidebar .widget {
  background: var(--mf-white);
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar .widget h4 {
  font-family: var(--mf-font-heading);
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mf-border);
}

.sidebar .widget ul {
  list-style: none;
  padding: 0;
}

.sidebar .widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--mf-border);
}

.sidebar .widget ul li:last-child {
  border-bottom: none;
}

.sidebar .widget ul li a {
  font-size: 15px;
  color: var(--mf-text-secondary);
}

.sidebar .widget ul li a:hover {
  color: var(--mf-accent);
}

/* ===================================================================
   COMMENTS
   =================================================================== */
.comments-area {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 64px;
}

.comments-area h3 {
  margin-bottom: 24px;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  padding: 24px 0;
  border-bottom: 1px solid var(--mf-border);
}

.comment .comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment .comment-meta img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.comment .comment-author {
  font-weight: 600;
  font-size: 15px;
}

.comment .comment-date {
  font-size: 13px;
  color: var(--mf-text-muted);
}

.comment .comment-body p {
  font-size: 16px;
  color: var(--mf-text-secondary);
}

.comment-respond {
  margin-top: 32px;
}

.comment-respond label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--mf-text);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-sm);
  font-family: var(--mf-font-body);
  font-size: 16px;
  margin-bottom: 16px;
  transition: border-color var(--mf-transition);
}

.comment-respond input:focus,
.comment-respond textarea:focus {
  outline: none;
  border-color: var(--mf-accent);
}

.comment-respond .submit {
  background: var(--mf-accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--mf-radius);
  font-family: var(--mf-font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--mf-transition);
}

.comment-respond .submit:hover {
  background: var(--mf-accent-hover);
}

/* ===================================================================
   PAGE TEMPLATES
   =================================================================== */
.page-header {
  padding: 64px 0 48px;
  text-align: center;
  background: var(--mf-white);
  border-bottom: 1px solid var(--mf-border);
}

.page-content {
  padding: 64px 0;
}

.page-content--prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px clamp(16px, 4vw, 48px);
}

.page-content--prose h2 { margin-top: 40px; margin-bottom: 16px; }
.page-content--prose h3 { margin-top: 32px; margin-bottom: 12px; }
.page-content--prose h4 { margin-top: 24px; margin-bottom: 8px; }
.page-content--prose p { margin-bottom: 1.2em; }
.page-content--prose ul, .page-content--prose ol { margin-bottom: 1.2em; }
.page-content--prose li { margin-bottom: 0.4em; }

/* Pricing page (standalone) */
.pricing-page-header {
  padding: 80px 0 48px;
  text-align: center;
  background: var(--mf-midnight);
  color: #fff;
}

.pricing-page-header h1 {
  color: #fff;
}

.pricing-page-header p {
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  max-width: 600px;
  margin: 16px auto 0;
}

/* FAQ Accordion */
.faq-section {
  padding: 80px 0;
  max-width: 800px;
  margin: 0 auto;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 48px;
}

.faq-item {
  border-bottom: 1px solid var(--mf-border);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mf-font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--mf-text);
  cursor: pointer;
  text-align: left;
  transition: color var(--mf-transition);
}

.faq-question:hover {
  color: var(--mf-accent);
}

.faq-question .faq-icon {
  flex-shrink: 0;
  font-size: 20px;
  transition: transform var(--mf-transition);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 16px;
  color: var(--mf-text-secondary);
  line-height: 1.6;
}

/* ===================================================================
   404 PAGE
   =================================================================== */
.error-404 {
  text-align: center;
  padding: 120px 0;
}

.error-404 .error-code {
  font-family: var(--mf-font-heading);
  font-size: clamp(6rem, 12vw, 10rem);
  font-weight: 900;
  color: var(--mf-border);
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}

.error-404 p {
  color: var(--mf-text-secondary);
  margin-bottom: 32px;
}

/* ===================================================================
   SEARCH
   =================================================================== */
.search-form-inline {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 24px auto 0;
}

.search-form-inline input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--mf-border);
  border-radius: var(--mf-radius-sm);
  font-family: var(--mf-font-body);
  font-size: 16px;
}

.search-form-inline input[type="search"]:focus {
  outline: none;
  border-color: var(--mf-accent);
}

.search-form-inline button {
  background: var(--mf-accent);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--mf-radius-sm);
  font-family: var(--mf-font-body);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--mf-transition);
}

.search-form-inline button:hover {
  background: var(--mf-accent-hover);
}

/* ===================================================================
   PAGINATION
   =================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 48px 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--mf-radius-sm);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--mf-border);
  color: var(--mf-text);
  transition: all var(--mf-transition);
}

.pagination a:hover {
  border-color: var(--mf-accent);
  color: var(--mf-accent);
}

.pagination .current {
  background: var(--mf-accent);
  border-color: var(--mf-accent);
  color: #fff;
}

/* ===================================================================
   ANIMATIONS
   =================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in-children > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-children.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-children.visible > *:nth-child(5) { transition-delay: 0.4s; }
.fade-in-children.visible > *:nth-child(6) { transition-delay: 0.5s; }

.fade-in-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-card--featured {
    transform: none;
  }

  .pricing-card--featured:hover {
    transform: translateY(-4px);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

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

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-content-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .primary-nav .nav-links,
  .header-cta {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* Mobile menu overlay */
  .mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mf-midnight);
    padding: 32px 24px;
    z-index: 999;
    overflow-y: auto;
  }

  .mobile-nav.active {
    display: block;
  }

  .mobile-nav ul {
    list-style: none;
    padding: 0;
  }

  .mobile-nav ul li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .mobile-nav ul li a {
    display: block;
    padding: 16px 0;
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    font-weight: 500;
  }

  .mobile-nav ul li a:hover {
    color: #fff;
  }

  .mobile-nav .mobile-cta {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .mobile-nav .mobile-cta a {
    text-align: center;
  }

  .hero {
    padding: 72px 0 80px;
  }

  .hero h1 {
    font-size: clamp(2rem, 6vw, 2.8rem);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .problem-solution {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

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

  .blog-index-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 64px 0;
  }

  .post-nav {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero .hero-cta .btn-cta,
  .hero .hero-cta .btn-ghost {
    justify-content: center;
  }

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

/* ===================================================================
   WORDPRESS OVERRIDES
   =================================================================== */
.wp-block-image { margin: 1.5em 0; }
.wp-block-image img { border-radius: var(--mf-radius-sm); }

.alignleft { float: left; margin-right: 24px; margin-bottom: 16px; }
.alignright { float: right; margin-left: 24px; margin-bottom: 16px; }
.aligncenter { display: block; margin: 1.5em auto; }

.wp-caption-text {
  font-size: 13px;
  color: var(--mf-text-muted);
  text-align: center;
  margin-top: 8px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Data deletion status box */
.deletion-status {
  max-width: 500px;
  margin: 32px auto;
  padding: 24px;
  background: var(--mf-accent-light);
  border: 1px solid var(--mf-accent);
  border-radius: var(--mf-radius);
  text-align: center;
}

.deletion-status code {
  display: inline-block;
  background: var(--mf-white);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 8px;
}

/* ===================================================================
   FLAME LOGO + FRAUNCES WORDMARK
   =================================================================== */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header-wordmark {
  font-family: var(--mf-font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.header-wordmark em {
  color: var(--mf-accent);
  font-style: normal;
}

.footer-logo .header-logo {
  margin-bottom: 16px;
}

/* ===================================================================
   CUSTOMER LOGOS — static grid, Rudderstack-style
   =================================================================== */
.section-logos {
  padding: 64px 0;
  border-top: 1px solid var(--mf-border);
  border-bottom: 1px solid var(--mf-border);
}

.logos-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--mf-text-muted);
  text-align: center;
  margin-bottom: 40px;
}

.logos-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px 64px;
}

.logos-item {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity var(--mf-transition);
}

/* Logo images: greyscale by default, colour on hover */
.logos-img {
  max-height: 36px;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.45;
  transition: filter var(--mf-transition), opacity var(--mf-transition);
}
.logos-item:hover .logos-img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Fallback: coloured mark + name for brands without a logo image */
.logos-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--mf-transition);
}
.logos-name {
  font-family: var(--mf-font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--mf-text);
  opacity: 0.4;
  transition: opacity var(--mf-transition);
}
.logos-item:hover .logos-mark,
.logos-item:hover .logos-name {
  opacity: 1;
}

@media (max-width: 768px) {
  .logos-grid {
    gap: 32px 40px;
  }
  .logos-img {
    max-height: 28px;
    max-width: 110px;
  }
}
