/* ============================================
   VALUE TO IMPACT — Design System
   Replit-inspired with custom warm palette
   ============================================ */

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

:root {
  /* Colors */
  --bg: #f0eee6;
  --surface: #f0efea;
  --primary: #8989de;
  --secondary: #4092e3;
  --tertiary: #c98066;
  --neutral: #ebdbbe;
  --text-primary: #000000;
  --text-secondary: #444444;
  --text-tertiary: #777777;
  --border: #ebdbbe;
  --border-card: rgba(0,0,0,0.10);
  --dark: #000000;
  --white: #ffffff;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-pad: 100px;
  --container: 1200px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--primary); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 24px; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 16px; }

p { margin-bottom: 16px; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

.label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: #7a7ad0;
  color: var(--white);
  box-shadow: 0 0 24px rgba(137,137,222,0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}
.btn-secondary:hover {
  background: #3680c9;
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(240,238,230,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 89px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img {
  height: 50px;
  width: auto;
  display: block;
}

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

.nav-links a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.nav-links > li { position: relative; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 8px;
  z-index: 100;
}

.nav-dropdown-inner {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 8px;
  min-width: 220px;
}

.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-dropdown a:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.nav-links > li:hover .nav-dropdown { display: block; }

.nav-links .has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 6px;
  vertical-align: middle;
  opacity: 0.5;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn { padding: 10px 24px; font-size: 14px; }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  padding: 160px 0 var(--section-pad);
  text-align: center;
}

.hero h1 { margin-bottom: 24px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero .subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
}
.hero .cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}
.hero .secondary-line {
  font-size: 15px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* --- Section --- */
.section {
  padding: var(--section-pad) 0;
}

.section-dark {
  background: var(--dark);
  color: var(--white);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.75); }
.section-dark .label { color: var(--tertiary); }

.section-neutral {
  background: var(--neutral);
}

.section-surface {
  background: var(--surface);
}

.section-header {
  max-width: 720px;
  margin-bottom: 56px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.2s ease;
}
.card:hover {
  border-color: rgba(0,0,0,0.15);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}

/* --- Pillar/Feature cards --- */
.pillar {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.pillar:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.pillar-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.pillar-content h3 { margin-bottom: 12px; }
.pillar-content p { font-size: 15px; line-height: 1.7; }

/* --- FAQ --- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.faq-item:first-child { border-top: 1px solid var(--border); }

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

.faq-q::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--text-tertiary);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item.open .faq-q::after {
  content: '−';
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-top: 16px;
}
.faq-a p { font-size: 15px; }

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: var(--section-pad) 0;
}
.cta-section h2 { max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-section p { max-width: 560px; margin: 0 auto 32px; }

/* --- Problem numbered list --- */
.problem-list { margin: 32px auto; max-width: 720px; }
.problem-split .problem-list { max-width: none; margin: 32px 0; }
.problem-item {
  margin-bottom: 24px;
}
.problem-item strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.problem-item p { margin-bottom: 0; font-size: 15px; }

/* --- Phase Timeline --- */
.phases-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.phase {
  position: relative;
  padding-left: 40px;
  margin-bottom: 48px;
}
.phase:last-child { margin-bottom: 0; }
.phase::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: -48px;
  width: 2px;
  background: var(--border);
}
.phase:last-child::before { display: none; }

.phase-dot {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
}

.phase h3 { font-size: 18px; margin-bottom: 8px; }
.phase p { font-size: 15px; margin-bottom: 8px; }
.phase ul {
  list-style: none;
  padding: 0;
}
.phase ul li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 15px;
  color: var(--text-secondary);
}
.phase ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tertiary);
}

/* --- Fit Section --- */
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.fit-col {
  border-radius: var(--radius-lg);
  padding: 36px;
}

.fit-col.good {
  background: rgba(137,137,222,0.06);
  border: 1.5px solid rgba(137,137,222,0.2);
}
.fit-col.not-fit {
  background: rgba(0,0,0,0.02);
  border: 1.5px solid rgba(0,0,0,0.06);
}

.fit-col h3 {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 18px;
}
.fit-col.good h3 { color: var(--primary); border-bottom-color: rgba(137,137,222,0.2); }
.fit-col.not-fit h3 { color: var(--text-tertiary); }

.fit-col ul {
  list-style: none;
  padding: 0;
}
.fit-col ul li {
  padding: 12px 0 12px 36px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.fit-col ul li:last-child { border-bottom: none; }

.fit-col.good ul li::before {
  content: '✓';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 24px;
  height: 24px;
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
}
.fit-col.not-fit ul li::before {
  content: '✗';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 24px;
  height: 24px;
  color: var(--text-tertiary);
  font-weight: 700;
  font-size: 16px;
}

/* --- Visual component wrapper --- */
.visual-embed {
  max-width: 1600px;
  margin: 40px auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-card);
  background: var(--surface);
  padding: 24px;
}

/* CSS variable mappings for embedded visual components */
.visual-embed {
  --font-sans: 'Inter', system-ui, sans-serif;
  --color-background-secondary: #f0efea;
  --color-border-tertiary: rgba(0,0,0,0.08);
  --color-text-primary: #000000;
  --color-text-secondary: #444444;
  --color-text-tertiary: #777777;
  --border-radius-lg: 12px;
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}

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

.footer-brand .nav-logo { margin-bottom: 16px; display: inline-flex; }
.footer-brand p { font-size: 14px; max-width: 320px; color: rgba(255,255,255,0.5); }

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  padding: 4px 0;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* --- About / Portrait --- */
.about-block {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}

.about-portrait {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neutral);
}

/* --- Services Grid (homepage) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.service-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(137,137,222,0.1);
  transform: translateY(-2px);
  color: inherit;
}
.service-card .label { margin-bottom: 8px; }
.service-card h3 { margin-bottom: 12px; color: var(--text-primary); }
.service-card p { font-size: 15px; margin-bottom: 16px; }
.service-card .card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* --- POV Section --- */
.pov-block {
  max-width: 720px;
  margin: 0 auto;
}
.pov-block h3 {
  margin-bottom: 12px;
  margin-top: 40px;
}
.pov-block h3:first-child { margin-top: 0; }
.pov-block p { font-size: 15px; }
.pov-block ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.pov-block ul li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 15px;
  color: var(--text-secondary);
}
.pov-block ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tertiary);
}

/* --- Stage cards for funnel --- */
.stage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin: 32px auto;
  max-width: 960px;
}

.stage-card {
  padding: 24px;
  border-radius: var(--radius-md);
}
.stage-card.pre {
  background: rgba(201,128,102,0.08);
  border: 1px solid rgba(201,128,102,0.15);
}
.stage-card.mid {
  background: rgba(137,137,222,0.08);
  border: 1px solid rgba(137,137,222,0.15);
}
.stage-card.post {
  background: rgba(235,219,190,0.3);
  border: 1px solid var(--border);
}

.stage-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.stage-card p { font-size: 14px; margin-bottom: 0; }

/* --- Social proof bar --- */
.proof-bar {
  text-align: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.proof-bar p {
  font-size: 14px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* --- Customer Logo Strip --- */
.logo-strip {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.logo-strip-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 28px;
}
.logo-strip-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 48px 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.logo-strip-grid img {
  height: 56px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  opacity: 0.65;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.logo-strip-grid img:hover {
  opacity: 1;
  filter: grayscale(0%);
}
/* Per-logo visual balancing — wordmarks with dense fill vs. logos with padding */
.logo-strip-grid img[src$="logo-unibuddy.png"] { height: 78px; max-width: 260px; }
.logo-strip-grid img[src$="logo-evolia.svg"]   { height: 64px; max-width: 260px; }
.logo-strip-grid img[src$="logo-pivot.png"]    { height: 46px; max-width: 220px; }
.logo-strip-grid img[src$="logo-franki.svg"]   { height: 44px; max-width: 220px; }
.logo-strip-grid img[src$="logo-3.avif"]       { height: 44px; }  /* 7shifts */
.logo-strip-grid img[src$="logo-4.png"]        { height: 48px; }  /* Shipday */
.logo-strip-grid img[src$="logo-5.svg"]        { height: 50px; }  /* Orders.co */

@media (max-width: 600px) {
  .logo-strip { padding: 40px 0; }
  .logo-strip-grid { gap: 28px 36px; }
  .logo-strip-grid img { height: 42px; max-width: 160px; }
  .logo-strip-grid img[src$="logo-unibuddy.png"] { height: 52px; }
  .logo-strip-grid img[src$="logo-evolia.svg"]   { height: 42px; }
  .logo-strip-grid img[src$="logo-pivot.png"]    { height: 30px; }
  .logo-strip-grid img[src$="logo-franki.svg"]   { height: 30px; }
  .logo-strip-grid img[src$="logo-3.avif"]       { height: 30px; }
  .logo-strip-grid img[src$="logo-4.png"]        { height: 32px; }
  .logo-strip-grid img[src$="logo-5.svg"]        { height: 34px; }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  :root { --section-pad: 64px; }

  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }

  .services-grid { grid-template-columns: 1fr; }
  .fit-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-block { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .stage-grid { grid-template-columns: 1fr; }

  .hero { padding-top: 120px; }
  .hero .cta-group { flex-direction: column; }
}

@media (max-width: 600px) {
  :root { --section-pad: 48px; }
  .pillar { grid-template-columns: 1fr; }
  .pillar-num { margin-bottom: 8px; }
}

/* --- Animations --- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Mobile Menu --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  padding: 100px 32px 32px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn {
  margin-top: 32px;
  width: 100%;
  justify-content: center;
}
