/*
 * ╔══════════════════════════════════════════════════════════════╗
 * ║                  NUDGE — COMPONENTS                         ║
 * ║                                                              ║
 * ║  Every reusable UI component on the site.                   ║
 * ║  Edit a component here → it updates everywhere it's used.  ║
 * ╚══════════════════════════════════════════════════════════════╝
 */


/* ═══════════════════════════════════════════════
   NAVIGATION BAR
   Fixed frosted-glass pill, top 16px.
   ═══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  background: transparent;
}

.nav-pill {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(231,229,228,0.80);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 12px 13px 22px;
  gap: 6px;
  overflow: hidden;
  max-width: 860px;
  margin-inline: auto;
}

.nav.scrolled .nav-pill {
  box-shadow: var(--shadow-nav-scrolled);
}

.nav-link {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-base), background var(--transition-base);
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--foreground);
  background: rgba(41,37,36,0.04);
}


/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */

/* ── Primary CTA — pill shape ── */
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition-base), transform var(--transition-fast);
  white-space: nowrap;
}
.btn-primary:hover  { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }

/* ── Primary with glow (used on coloured sections) ── */
.btn-primary-glow {
  box-shadow: var(--shadow-primary-glow);
}
.btn-primary-glow:hover {
  box-shadow: var(--shadow-primary-glow-hover);
}

/* ── Ghost / text button ── */
.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background var(--transition-base);
}
.btn-ghost:hover { background: rgba(41,37,36,0.05); }

/* ── Dark section outline button ── */
.btn-dark-outline {
  background: transparent;
  color: var(--dark-section-fg);
  border: 1px solid rgba(250,249,247,0.25);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-base), border-color var(--transition-base);
}
.btn-dark-outline:hover {
  background: rgba(250,249,247,0.08);
  border-color: rgba(250,249,247,0.40);
}


/* ═══════════════════════════════════════════════
   BADGES / PILLS
   Small coloured status labels.
   Usage: <span class="badge badge-green">Active</span>
   ═══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  border: 1px solid;
}
.badge-orange  { background: rgba(249,115,22,0.08);  color: var(--orange-dark); border-color: rgba(234,88,12,0.20); }
.badge-green   { background: rgba(34,197,94,0.08);   color: var(--green-dark);  border-color: rgba(22,163,74,0.20); }
.badge-blue    { background: rgba(59,130,246,0.08);  color: var(--blue-dark);   border-color: rgba(37,99,235,0.20); }
.badge-purple  { background: rgba(75,78,128,0.08);   color: var(--primary);     border-color: rgba(75,78,128,0.20); }


/* ═══════════════════════════════════════════════
   PROMPT BOX (hero input)
   ═══════════════════════════════════════════════ */
.prompt-box {
  background: rgba(210, 225, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* Outer blue line — thin */
  border: 1px solid rgba(175, 198, 252, 0.43);
  border-radius: 26px;
  box-shadow: 0 4px 32px rgba(75,78,128,0.10);
  /* Frosted glass ring thickness */
  padding: 9px;
}

.prompt-box-inner {
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: 14px 14px 10px;
}

.prompt-input {
  border: none;
  outline: none;
  resize: none;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--foreground);
  background: transparent;
  line-height: var(--leading-relaxed);
  min-height: 68px;
  margin-bottom: 14px;
}
.prompt-input::placeholder { color: var(--muted-foreground); }

/* ── Suggestion chips inside prompt box ── */
.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--chip-bg);
  border: none;
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--foreground);
  cursor: pointer;
  transition: background var(--transition-base);
  white-space: nowrap;
}
.prompt-chip:hover { background: var(--chip-hover-bg); }

/* ── Send button ── */
.prompt-send {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), transform var(--transition-fast);
  flex-shrink: 0;
}
.prompt-send:hover  { background: var(--primary-dark); }
.prompt-send:active { transform: scale(0.94); }


/* ═══════════════════════════════════════════════
   PROMPT PILL (email marquee overlay)
   ─────────────────────────────────────────────
   Floating pill above each email card in the marquee.
   Appears with a pop animation when card is in view.
   ═══════════════════════════════════════════════ */
.prompt-pill {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) scale(0.72) translateY(4px);
  opacity: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FEFEE0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid #EDED9A;
  border-radius: var(--radius-full);
  padding: 13px 22px 13px 16px;
  font-size: 13.5px;
  font-weight: var(--weight-medium);
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 18px rgba(240,239,128,0.35), 0 1px 4px rgba(0,0,0,0.08);
  pointer-events: none;
  z-index: 5;
  transition: none;
}
.prompt-pill.pill-pop {
  animation: pillPop 0.42s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.prompt-pill.pill-visible {
  opacity: 1;
  transform: translateX(-50%) scale(1) translateY(0);
}

.prompt-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  opacity: 0.9;
}

.prompt-pill-text {
  display: inline;
}

.prompt-pill-typing {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.prompt-pill-cursor {
  display: none;
  width: 1.5px;
  height: 10px;
  background: rgba(255,255,255,0.85);
  border-radius: 1px;
  vertical-align: middle;
  margin-left: 0;
  flex-shrink: 0;
  animation: pillCursor 0.7s step-end infinite;
}


/* ═══════════════════════════════════════════════
   WHY-SWITCH CARDS
   ─────────────────────────────────────────────
   Three flat pastel cards in a 3-column grid.
   Base class + color variants for bg + dark mode.

   Usage:
   <div class="why-card why-card-green-yellow">
     <div class="why-card-inner">
       <div class="why-card-icon">…svg…</div>
       <h3 class="why-card-title">…</h3>
       <p class="why-card-desc">…</p>
     </div>
   </div>
   ═══════════════════════════════════════════════ */
.why-card {
  position: relative;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: default;
  transition:
    transform var(--transition-slow),
    box-shadow var(--transition-slow);
}
.why-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* Legacy class aliases (used in index.html) */
.why-card-amber  { background: var(--card-bg-green-yellow); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.why-card-indigo { background: var(--card-bg-neutral);      box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.why-card-green  { background: var(--card-bg-blue);         box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.why-card-amber:hover,
.why-card-indigo:hover,
.why-card-green:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 40px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06) !important;
}

.why-card-inner {
  padding: 32px 32px 36px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

/* Icon container — top-left */
.why-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* Card heading — large display style */
.why-card-title {
  font-size: clamp(2.25rem, 3vw, 3rem);
  font-weight: var(--weight-bold);
  color: #0a0a0a;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
  flex: 1;
}

.why-card-desc {
  font-size: var(--text-md);
  color: rgba(0,0,0,0.55);
  line-height: var(--leading-relaxed);
  margin: 0;
}


/* ═══════════════════════════════════════════════
   FEATURE SECTION — sidebar pills
   ═══════════════════════════════════════════════ */
.feat-pill {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 20px;
  border-radius: var(--radius-full);
  border: none;
  background: rgba(41,37,36,0.05);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--foreground);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--transition-base), color var(--transition-base);
}
.feat-pill:hover {
  background: rgba(75,78,128,0.08);
  color: var(--primary);
}
/* Active: animating gradient fill */
.feat-pill.feat-pill-active {
  background: linear-gradient(to right, rgba(75,78,128,0.20) 50%, rgba(75,78,128,0.08) 50%);
  background-size: 200% 100%;
  background-position: right center;
  animation: pill-fill 4s linear forwards;
  color: var(--primary);
}
/* Selected: fill complete, no animation */
.feat-pill.feat-pill-selected {
  background: rgba(75,78,128,0.20);
  color: var(--primary);
  animation: none;
}

@keyframes pill-fill {
  from { background-position: right center; }
  to   { background-position: left center; }
}


/* ═══════════════════════════════════════════════
   FEATURE INTEGRATIONS BAR — brand logo icons
   ═══════════════════════════════════════════════ */
.feat-integ-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.20);
  opacity: 0.9;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-base), transform var(--transition-base);
}
.feat-integ-icon:hover { opacity: 1; transform: translateY(-2px); }
.feat-integ-icon svg { width: 100%; height: 100%; display: block; }
.feat-integ-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 8px;
  box-sizing: border-box;
}

/* Mobile carousel — hidden on desktop, shown via mobile.css */
#feat-mob { display: none; }


/* ═══════════════════════════════════════════════
   FEATURE CARDS (9-grid section)
   ═══════════════════════════════════════════════ */
.feature-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 1.125rem;
}


/* ═══════════════════════════════════════════════
   INFRA CARDS (image-showcase grid)
   ═══════════════════════════════════════════════ */
.infra-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}
.infra-card:hover { box-shadow: 0 6px 24px -4px rgba(41,37,36,0.12); }

.infra-card-text { padding: 20px 22px 14px; }
.infra-card-text h4 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  margin-bottom: 4px;
}
.infra-card-text p {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: var(--leading-normal);
}

.infra-card-img {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9ff;
  min-height: 0;
}
.infra-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 100%;
}


/* ═══════════════════════════════════════════════
   EMAIL GALLERY CARDS
   ═══════════════════════════════════════════════ */
.email-gallery-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(41,37,36,0.06), 0 2px 8px -4px rgba(41,37,36,0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.email-gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px -4px rgba(41,37,36,0.14);
}


/* ═══════════════════════════════════════════════
   EMAIL MARQUEE CARDS
   ─────────────────────────────────────────────
   Cards in the scrolling email showcase section.
   Each card has a pastel background and a floating
   prompt pill above it.

   Usage:
   <div class="email-marquee-item">
     <div class="prompt-pill" …>…</div>
     <div class="email-marquee-card" style="background:#EDE4D8;">
       <img … />
     </div>
   </div>
   ═══════════════════════════════════════════════ */
.email-marquee-item {
  position: relative;
  flex-shrink: 0;
  width: 340px;
}

.email-marquee-card {
  width: 100%;
  height: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  padding: 50px 50px 0;
  display: flex;
  align-items: flex-start;
}

.email-marquee-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px 10px 0 0;
  height: 430px;
}

.email-marquee-track {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: max-content;
  padding: 20px 0 48px;
  animation: emailScrollLeft 70s linear infinite;
}


/* ═══════════════════════════════════════════════
   MOCKUP WRAP (hero-image-wrap)
   ─────────────────────────────────────────────
   Bordered rounded container for app screenshots
   and animation mockups.
   ═══════════════════════════════════════════════ */
.mockup-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(231,229,228,0.9);
  box-shadow: var(--shadow-image-wrap);
}


/* ═══════════════════════════════════════════════
   TESTIMONIAL CARDS
   ═══════════════════════════════════════════════ */
.testimonial-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.25rem;
  width: 300px;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════
   PRICING CARDS
   ═══════════════════════════════════════════════ */
.pricing-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2rem;
  transition: box-shadow 0.2s ease;
}
.pricing-card:hover { box-shadow: var(--shadow-card-hover); }

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.pricing-card.featured:hover {
  box-shadow: 0 0 0 2px var(--primary), 0 4px 24px -4px rgba(75,78,128,0.20);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-base);
  color: var(--muted-foreground);
  margin-bottom: 8px;
}
.check-item svg { flex-shrink: 0; margin-top: 2px; }


/* ═══════════════════════════════════════════════
   FAQ ACCORDION
   ═══════════════════════════════════════════════ */
.faq-item { border-bottom: 1px solid var(--border); }

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  color: var(--foreground);
  transition: color var(--transition-base);
}
.faq-trigger:hover { color: var(--primary); }

.faq-chevron { transition: transform 0.20s ease; flex-shrink: 0; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s cubic-bezier(0.4,0,0.2,1);
}
.faq-body.open { max-height: 400px; }

.faq-body p {
  padding-bottom: 20px;
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--muted-foreground);
}


/* ═══════════════════════════════════════════════
   CAMPAIGN TABS
   ═══════════════════════════════════════════════ */
.camp-tab {
  cursor: pointer;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--muted-foreground);
  transition: all var(--transition-base);
  border: 1px solid transparent;
  white-space: nowrap;
}
.camp-tab:hover { color: var(--foreground); }
.camp-tab.active {
  background: var(--background);
  color: var(--foreground);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.camp-panel        { display: none; }
.camp-panel.active { display: block; }


/* ═══════════════════════════════════════════════
   SOCIAL PROOF LOGO ROW
   ─────────────────────────────────────────────
   Flex row of partner/customer logos.
   Usage: <div class="logo-row">…<img>…</div>
   ═══════════════════════════════════════════════ */
.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

.logo-row img {
  height: 22px;
  width: auto;
  opacity: 0.55;
  filter: grayscale(1);
  transition: opacity var(--transition-base);
}

.logo-row img:hover { opacity: 0.8; }


/* ═══════════════════════════════════════════════
   DARK SECTION
   ═══════════════════════════════════════════════ */
.section-dark {
  background: var(--dark-section-bg);
  color: var(--dark-section-fg);
}
.section-dark .section-heading {
  color: var(--dark-section-fg);
}


/* ═══════════════════════════════════════════════
   SECTION SEPARATOR UTILITIES
   ═══════════════════════════════════════════════ */

/* Diagonal cross-hatch background texture */
.hatch-bg {
  background-image:
    repeating-linear-gradient(315deg, rgba(180,176,172,0.18) 0 1px, transparent 0 50%),
    repeating-linear-gradient(45deg,  rgba(180,176,172,0.18) 0 1px, transparent 0 50%);
  background-size: 14px 14px;
}

/* Gradient fade separator line */
.sep {
  height: 1px;
  background: linear-gradient(to right,
    transparent 0%,
    var(--border) 20%,
    var(--border) 80%,
    transparent 100%
  );
}

/* Empty shell for section-hatch (left for backward compat) */
.section-hatch {}


/* ═══════════════════════════════════════════════
   COMPARISON TABLE
   ─────────────────────────────────────────────
   Used on compare.html and why-nudge.html.
   ═══════════════════════════════════════════════ */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 14px 20px;
  font-size: var(--text-md);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.compare-table th {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--foreground);
  background: var(--secondary);
}

.compare-table td { color: var(--muted-foreground); }
.compare-table td:first-child { color: var(--foreground); font-weight: var(--weight-medium); }


/* ═══════════════════════════════════════════════
   FORM ELEMENTS
   ─────────────────────────────────────────────
   For sign-up.html and any form pages.
   ═══════════════════════════════════════════════ */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--foreground);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(75,78,128,0.12);
}
.form-input::placeholder { color: var(--muted-foreground); }

.form-hint {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--destructive);
}
