/* ============================================================
   Leafbuyer Tech — main.css
   Clean build, zero Wix dependencies
   ============================================================ */

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1a1a2e;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --green:       #2d6a4f;
  --green-light: #52b788;
  --green-pale:  #d8f3dc;
  --navy:        #0d1b2a;
  --navy-mid:    #1b2838;
  --slate:       #4a5568;
  --slate-light: #718096;
  --border:      #e2e8f0;
  --bg-alt:      #f7f9fc;
  --white:       #ffffff;

  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;

  --shadow-sm:   0 1px 4px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);

  --nav-h:       72px;
  --section-pad: 96px;
  --content-w:   1160px;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { color: var(--slate); line-height: 1.75; }

.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .75rem;
}

/* ── Layout Helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
}
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: var(--navy);
  color: var(--white);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--white); }
.section--dark p { color: rgba(255,255,255,.75); }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.section-header p { margin-top: 16px; font-size: 1.05rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .15s, box-shadow .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(45,106,79,.35);
}
.btn-primary:hover {
  background: #235c41;
  box-shadow: 0 6px 20px rgba(45,106,79,.45);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.btn-light:hover {
  background: var(--bg-alt);
}

.btn-lg { padding: 17px 36px; font-size: 1rem; }

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.site-nav.scrolled { box-shadow: var(--shadow); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--navy);
}
.nav-logo img { height: 36px; width: auto; }
.nav-logo span { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--slate);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--navy); background: var(--bg-alt); }
.nav-link.active { color: var(--green); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-link::after {
  content: ' ▾';
  font-size: .7rem;
  opacity: .6;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  transform: translateX(-50%) translateY(-4px);
}
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--slate);
  transition: background .12s, color .12s;
}
.dropdown-menu a:hover { background: var(--bg-alt); color: var(--navy); }

.nav-cta { margin-left: 16px; }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: .2s;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 999;
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  color: var(--slate);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile .mobile-cta {
  margin-top: 16px;
  display: block;
  text-align: center;
  padding: 14px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ── Page Offset ─────────────────────────────────────────── */
.page-body { padding-top: var(--nav-h); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 50%, #0d3320 100%);
  color: var(--white);
  padding: 112px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/images/hero-pattern.svg') center/cover no-repeat;
  opacity: .06;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-text { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 36px;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; align-self: flex-start; }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
}
.hero-stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-light);
}
.hero-stat-lbl {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}
.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
}
.hero-badge {
  position: static;
  background: var(--green);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
}

/* ── Trust bar ───────────────────────────────────────────── */
.trust-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.trust-bar-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}
.trust-bar-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate-light);
  white-space: nowrap;
}
.trust-bar-logos {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-bar-logos img {
  height: 28px;
  width: auto;
  opacity: .55;
  filter: grayscale(1);
  transition: opacity .2s;
}
.trust-bar-logos img:hover { opacity: .85; }

/* ── Feature Cards ───────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.cards-grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px; height: 48px;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}
.card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.card p { font-size: .92rem; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--green);
}
.card-link::after { content: '→'; }

/* ── Product Feature Row ─────────────────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feature-content .eyebrow { margin-bottom: 12px; }
.feature-content h2 { margin-bottom: 16px; }
.feature-content p { margin-bottom: 24px; }

.feature-list { margin-bottom: 28px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .94rem;
  color: var(--slate);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: '✓';
  width: 22px; height: 22px;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-visual img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
}
.feature-visual-placeholder {
  background: linear-gradient(135deg, var(--green-pale), #b7e4c7);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* ── Stats Row ───────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-block {
  background: var(--white);
  padding: 40px 32px;
  text-align: center;
}
.section--dark .stat-block { background: rgba(255,255,255,.06); }
.stat-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green-light);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-lbl {
  font-size: .88rem;
  color: var(--slate);
}
.section--dark .stat-lbl { color: #333; }

/* ── Testimonials ────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.section--dark .testimonial-card {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
}
.testimonial-stars { color: #f59e0b; font-size: 1rem; margin-bottom: 14px; }
.testimonial-text {
  font-size: .94rem;
  line-height: 1.7;
  color: var(--slate);
  margin-bottom: 20px;
  font-style: italic;
}
.section--dark .testimonial-text { color: rgba(255,255,255,.7); }
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: var(--green);
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: .9rem; color: var(--navy); }
.section--dark .testimonial-name { color: var(--white); }
.testimonial-title { font-size: .8rem; color: var(--slate-light); }

/* ── CTA Banner ──────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--green) 0%, #1b5e3a 100%);
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,.8); max-width: 500px; }
.cta-banner-actions { display: flex; gap: 16px; flex-shrink: 0; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding: 72px 0 40px;
}

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

.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand .nav-logo img { height: 32px; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 300px; }
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: background .15s;
}
.footer-social a:hover { background: var(--green); }

.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: color .15s;
}
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.45); }
.footer-legal {
  display: flex;
  gap: 24px;
}
.footer-legal a {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  transition: color .15s;
}
.footer-legal a:hover { color: var(--white); }

/* ── Blog / Post ─────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.blog-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--green-pale);
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--green-pale);
  color: var(--green);
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.blog-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  flex: 1;
}
.blog-card-meta {
  font-size: .78rem;
  color: var(--slate-light);
  margin-top: 16px;
}
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}
.blog-pagination a {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 600;
  color: var(--slate);
  transition: background .12s, color .12s;
}
.blog-pagination a:hover,
.blog-pagination a.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* Post */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}
.post-header { margin-bottom: 36px; }
.post-header h1 { margin-bottom: 16px; }
.post-meta { display: flex; gap: 20px; font-size: .84rem; color: var(--slate-light); }
.post-hero-img {
  border-radius: var(--radius);
  width: 100%;
  margin-bottom: 40px;
  aspect-ratio: 16/7;
  object-fit: cover;
}
.post-body h2 { margin: 36px 0 14px; font-size: 1.5rem; }
.post-body h3 { margin: 28px 0 10px; font-size: 1.2rem; }
.post-body p { margin-bottom: 18px; }
.post-body ul, .post-body ol {
  margin: 16px 0 18px 24px;
  list-style: disc;
}
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 8px; color: var(--slate); }
.post-body a { color: var(--green); text-decoration: underline; }
.post-body blockquote {
  border-left: 4px solid var(--green);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.sidebar-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.sidebar-card h4 { margin-bottom: 16px; font-size: .95rem; }

/* ── Page Hero (interior) ────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a5c 100%);
  padding: 80px 0 72px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 16px; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 600px; margin: 0 auto 32px; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  gap: 16px;
}
.faq-question .faq-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding-bottom: 20px;
  color: var(--slate);
  line-height: 1.75;
  font-size: .95rem;
}
.faq-item.open .faq-answer { display: block; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-pad: 72px; }
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { display: none; }
  .feature-row { grid-template-columns: 1fr; gap: 40px; }
  .feature-row.reverse { direction: ltr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; }
}

@media (max-width: 768px) {
  :root { --section-pad: 56px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .cards-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; text-align: center; padding: 40px 28px; }
  .cta-banner-actions { flex-direction: column; align-items: stretch; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 20px; }
}
