/* ═══════════════════════════════════════════════════════════════
   InsightGap Landing — shared styles
   Palette: Warm Beige · Typography: Inter + DM Mono
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Warmer Sweetgreen-inspired palette: forest greens + cream */
  --bg:        #faf6ec;            /* warm cream base */
  --bg-soft:   #f1ebd7;            /* deeper cream */
  --bg-deep:   #1a3a26;            /* deep forest */
  --bg-card:   #fffdf6;            /* warm card surface */
  --ink:       #1a2e22;             /* deep forest ink */
  --ink-dim:   #4a5a4f;
  --ink-mute:  #5c6b60; /* was #8a9a8f — darkened for WCAG AA 4.5:1 contrast on cream */
  --primary:   #2d5a3d;             /* primary forest green */
  --primary-soft: rgba(45,90,61, 0.12);
  --accent:    #d4e8a8;             /* lime cream */
  --accent-deep: #1a3a26;           /* deep forest */
  --accent-soft: rgba(45,90,61, 0.10);
  --line:      rgba(26, 58, 38, 0.12);
  --line-2:    rgba(26, 58, 38, 0.22);
  --bad:       #c2410c;             /* warm terracotta accent */
  --warn:      #b45309;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─────────────────────────────────── Nav ─────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(255,255,255, 0.45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

.brand {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 96;
  font-weight: 600; font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-word .bw-gap { font-style: italic; font-weight: 500; }
.brand-logo {
  width: 30px; height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}
.brand-word { display: inline-flex; }
.brand-word .bw-insight,
.brand-word .bw-gap     { color: #0a0a0a; }
.section.dark .brand-word .bw-insight,
.section.dark .brand-word .bw-gap,
.footer .brand-word .bw-insight,
.footer .brand-word .bw-gap { color: #ffffff; }

.nav-links {
  display: flex; align-items: center; gap: 26px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-dim);
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

/* ── Products dropdown ── */
.nav-dropdown {
  position: relative; display: flex; align-items: center;
}
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 4px;
  cursor: pointer; color: var(--ink-dim);
  font-size: 13.5px; font-weight: 500;
  transition: color .2s; user-select: none;
  background: none; border: none; padding: 0; font-family: inherit;
}
.nav-dropdown-trigger:hover, .nav-dropdown:hover .nav-dropdown-trigger { color: var(--ink); }
.nav-dropdown-chevron {
  width: 12px; height: 12px; margin-top: 1px;
  transition: transform .2s;
}
.nav-dropdown:hover .nav-dropdown-chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  padding-top: 12px;
  min-width: 210px;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 200;
}
.nav-dropdown-menu-inner {
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 6px;
  box-shadow: 0 8px 28px -8px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 7px;
  text-decoration: none; transition: background .15s;
  color: var(--ink);
}
.nav-dropdown-item:hover { background: var(--surface); color: var(--ink); }
.nav-dropdown-icon {
  font-size: 18px; line-height: 1; flex-shrink: 0; margin-top: 1px;
}
.nav-dropdown-label { font-size: 13px; font-weight: 600; }
.nav-dropdown-desc { font-size: 11.5px; color: var(--ink-dim); margin-top: 1px; }

.nav-cta {
  padding: 9px 18px;
  border-radius: 6px;
  background: var(--accent-deep);
  color: #fff !important;
  font-weight: 600;
  font-size: 13.5px;
  transition: background .2s, transform .2s;
}
.nav-cta:hover { background: var(--primary); transform: translateY(-1px); }

/* ─────────────────────────── Mid-page CTA ───────────────────────────── */
.mid-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  max-width: 1080px;
  margin: 80px auto 96px;
  padding: 36px 44px;
  background: linear-gradient(135deg, #1a3a26 0%, #2d5a3d 100%);
  border-radius: 24px;
  color: #fffdf6;
  box-shadow: 0 24px 64px -24px rgba(26,58,38,0.4);
}
.mid-cta-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: #d4e8a8;
  margin-bottom: 10px;
}
.mid-cta h3 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.mid-cta p {
  font-size: 14.5px; line-height: 1.5;
  color: rgba(255,253,246,0.75);
  max-width: 56ch; margin: 0;
}
.mid-cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px;
  background: #d4e8a8;
  color: #1a3a26 !important;
  font-weight: 700; font-size: 15px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s;
  flex: 0 0 auto;
}
.mid-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(212,232,168,0.5); background: #c8dc98; }
.mid-cta-btn svg { width: 18px; height: 18px; }
@media (max-width: 820px) {
  .mid-cta {
    flex-direction: column; align-items: stretch; text-align: left;
    margin: 56px 18px 64px;
    padding: 28px 24px;
  }
  .mid-cta-btn { align-self: flex-start; }
}

/* ─────────────────────── Sticky mobile CTA bar ──────────────────────── */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 90;
  padding: 14px 18px;
  background: #1a3a26;
  color: #fffdf6;
  border-radius: 999px;
  box-shadow: 0 12px 32px -10px rgba(26,58,38,0.5), 0 0 0 1px rgba(212,232,168,0.25);
  font-weight: 700; font-size: 15px;
  text-align: center;
  align-items: center; justify-content: center; gap: 8px;
}
.sticky-mobile-cta svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .sticky-mobile-cta { display: inline-flex; }
  body { padding-bottom: 72px; }
}

@media (max-width: 720px) {
  .nav { padding: 0 18px; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex !important; }
}

/* ──────────────────────── Mobile hamburger button ───────────────────── */
.nav-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  flex-direction: column;
  gap: 5px;
  transition: background .2s, border-color .2s;
}
.nav-burger:hover { background: rgba(26,58,38,0.06); border-color: var(--line-2); }
.nav-burger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s ease;
  transform-origin: center;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ──────────────────────── Mobile slide-in menu ──────────────────────── */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  visibility: hidden;
}
.nav-mobile.is-open { pointer-events: auto; visibility: visible; }
.nav-mobile-backdrop {
  position: absolute; inset: 0;
  background: rgba(26,58,38,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.nav-mobile.is-open .nav-mobile-backdrop { opacity: 1; }
.nav-mobile-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(86vw, 340px);
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -16px 0 60px -12px rgba(26,58,38,0.35);
  padding: calc(var(--nav-h) + 24px) 24px 28px;
  display: flex; flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  transition: transform .3s var(--ease);
}
.nav-mobile.is-open .nav-mobile-panel { transform: translateX(0); }
.nav-mobile-panel a {
  display: flex; align-items: center;
  padding: 16px 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.01em;
}
.nav-mobile-panel a:last-child { border-bottom: none; }
.nav-mobile-panel a:hover { color: var(--primary); }
.nav-mobile-cta {
  margin-top: 18px;
  padding: 16px 22px !important;
  background: var(--primary);
  color: #fffdf6 !important;
  border-radius: 12px !important;
  border: none !important;
  justify-content: center !important;
  gap: 10px !important;
  font-weight: 700 !important;
}
.nav-mobile-cta:hover { background: #1a3a26; color: #fffdf6 !important; }

body.nav-mobile-open { overflow: hidden; }

/* ──────────────────────────────── Section frame ──────────────────────────── */

.section {
  position: relative;
  padding: 120px 24px;
}
.section.compact { padding: 96px 24px; }
.section.tall    { padding: 140px 24px 160px; }

.section.dark {
  background: var(--bg-deep);
  color: #f5ead6;
}
.section.dark .section-eyebrow { color: rgba(245,234,214,0.6); }
.section.dark .section-eyebrow .dot { background: var(--primary); box-shadow: 0 0 0 4px rgba(95,168,58,0.18); }
.section.soft   { background: var(--bg-soft); }
.section.cream  { background: #f0fae0; }

.wrap     { max-width: 1180px; margin: 0 auto; }
.wrap-md  { max-width: 980px;  margin: 0 auto; }
.wrap-sm  { max-width: 760px;  margin: 0 auto; }

/* Eyebrow */
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
  background: transparent;
  border: none;
  padding: 0;
}
.section-eyebrow .dot {
  display: none;
}

/* Display headlines — match the hero halo treatment */
.h-display {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
  color: var(--ink);
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(255,255,255,0.85), 0 0 28px rgba(255,255,255,0.6);
}
.h-display em {
  font-style: italic;
  color: var(--accent-deep);
  text-shadow: 0 1px 2px rgba(255,255,255,0.9), 0 0 32px rgba(255,255,255,0.65);
}
.section.dark .h-display,
.section.dark .h-display em { text-shadow: none; }
.h-1 { font-size: clamp(44px, 7.5vw, 96px); }
.h-2 { font-size: clamp(40px, 6.2vw, 80px); }
.h-3 { font-size: clamp(28px, 4vw, 48px); }

.lead-copy {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-dim);
  text-wrap: pretty;
  text-shadow: 0 1px 1px rgba(255,255,255,0.6);
}
.section.dark .lead-copy { text-shadow: none; }
.section.dark .lead-copy { color: rgba(245,234,214,0.78); }

/* ─────────────────────────────── Buttons ─────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500; font-size: 14px; letter-spacing: 0;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
  outline-offset: 2px;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn.large {
  height: 48px;
  padding: 0 28px;
  border-radius: 8px;
  font-size: 15px;
}
/* Arrow-style trailing svg: translates on hover (shadcn pattern) */
.btn svg {
  flex: 0 0 auto;
  pointer-events: none;
  opacity: 0.7;
  transition: transform .2s var(--ease), opacity .2s;
  margin-right: -2px;
  margin-left: 4px;
}
.btn:hover svg { transform: translateX(2px); opacity: 1; }

.btn-primary {
  background: var(--accent-deep);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-primary:hover {
  background: rgba(63,139,31,0.9);
}

.btn-orange {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-orange:hover {
  background: rgba(95,168,58,0.9);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--ink);
  border-color: var(--line-2);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: transparent;
}

.section.dark .btn-ghost {
  color: #f5ead6;
  border-color: rgba(245,234,214,0.25);
}
.section.dark .btn-ghost:hover { border-color: rgba(245,234,214,0.6); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; align-items: center; }

/* ─────────────────────────────── Generic pill ─────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.pill svg { width: 14px; height: 14px; color: var(--accent-deep); flex: 0 0 auto; }

/* ─────────────────────────────── Reveal anim ─────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.97);
  transition: opacity 1.05s var(--ease), transform 1.05s var(--ease);
  will-change: transform, opacity;
}
.reveal.in { opacity: 1; transform: translateY(0) scale(1); }

/* Staggered children inside a Reveal — applied automatically when .reveal-stagger is in view */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .14s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .23s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .41s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .50s; }

/* Phone mockup disclaimer — appears below each visual mock */
.phone-mock-note {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-dim);
  text-align: center;
  margin: 16px auto 0;
  max-width: 320px;     /* matches phone frame width on hero so it anchors visually */
  line-height: 1.4;
  opacity: 0.7;
  font-feature-settings: 'ss01', 'cv11';   /* modern Inter ligatures for cleaner glyphs */
}

/* Parallax — JS sets --p (-1..1 across viewport). Apply translateY based on it. */
.parallax     { transform: translate3d(0, calc(var(--p, 0) * 24px), 0); will-change: transform; }
.parallax-up  { transform: translate3d(0, calc(var(--p, 0) * -36px), 0); will-change: transform; }
.parallax-bg  { transform: translate3d(0, calc(var(--p, 0) * 60px), 0); will-change: transform; }

/* Scroll-tilted phones: subtle 3D nudge while in viewport */
.phone-mock,
.step-phone,
.sms-phone,
.scale-hub {
  transform-style: preserve-3d;
  transition: transform .8s var(--ease);
}
.phone-mock.in-view,
.step-phone.in-view {
  transform: perspective(1400px) rotateX(calc(var(--p, 0) * 4deg)) rotateY(calc(var(--p, 0) * -3deg)) translateZ(0);
}

/* Card hover lift */
.product-card,
.step-phone,
.scale-stat,
.sms-prompt-btn {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.product-card:hover,
.scale-stat:hover { transform: translateY(-4px); box-shadow: 0 36px 80px -36px rgba(28,16,5,0.35); }
.step-phone:hover { transform: translateY(-6px) perspective(1400px) rotateX(2deg); }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > *,
  .parallax,
  .parallax-up,
  .parallax-bg { opacity: 1; transform: none !important; transition: none; }
  .phone-mock.in-view,
  .step-phone.in-view { transform: none; }
}

/* ─────────────────────────────── Footer ─────────────────────────────── */
.footer {
  background: var(--bg-deep);
  color: rgba(245,234,214,0.7);
  padding: 56px 24px 36px;
  border-top: 1px solid rgba(245,234,214,0.08);
}
.footer-grid {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 32px;
}
.footer .brand { color: #f5ead6; }
.footer-tag { font-size: 13px; margin-top: 8px; max-width: 36ch; line-height: 1.6; }
.footer-trust {
  font-size: 12px;
  margin-top: 14px;
  max-width: 38ch;
  line-height: 1.55;
  color: rgba(255,253,246,0.55);
  border-top: 1px solid rgba(255,253,246,0.12);
  padding-top: 12px;
}
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 {
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(245,234,214,0.55); font-weight: 500;
  margin-bottom: 14px;
}
.footer-col a {
  display: block; font-size: 14px; color: rgba(245,234,214,0.78);
  padding: 4px 0; transition: color .2s;
}
.footer-col a:hover { color: #f5ead6; }
.footer-fine {
  max-width: 1180px; margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(245,234,214,0.08);
  font-size: 12px;
  color: rgba(245,234,214,0.45);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* Section 3 nowrap on desktop, wrap on mobile */
.shift-line { white-space: nowrap; }
@media (max-width: 720px) {
  .shift-line { white-space: normal; }
}

/* ─────────────────────────────── Mobile tuning ─────────────────────────── */

@media (max-width: 720px) {
  .section          { padding: 72px 18px; }
  .section.compact  { padding: 60px 18px; }
  .section.tall     { padding: 80px 18px 96px; }

  .section-eyebrow {
    font-size: 12px;
    letter-spacing: 0.14em;
    padding: 0;
    gap: 8px;
  }

  .h-1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.08; }
  .h-2 { font-size: clamp(28px, 7.6vw, 40px); line-height: 1.1; }
  .h-3 { font-size: clamp(22px, 6vw, 30px); line-height: 1.15; }

  .lead-copy { font-size: 15px; line-height: 1.5; }

  .btn        { padding: 12px 18px; font-size: 14px; }
  .btn.large  { padding: 14px 22px; font-size: 15px; }
  .cta-row    { gap: 10px; margin-top: 20px; }

  .footer { padding: 44px 20px 28px; }
  .footer-cols { gap: 32px; }
}

@media (max-width: 480px) {
  .section          { padding: 56px 16px; }
  .h-1 { font-size: 30px; }
  .h-2 { font-size: 26px; }
  .h-3 { font-size: 21px; }
  .lead-copy { font-size: 14.5px; }
  .btn        { width: 100%; }
  .cta-row    { flex-direction: column; align-items: stretch; }
}
