/* ==========================================================================
   public.css — marketing site design system (LeadCRM)
   Loaded after app.css on base_public.html only.
   ========================================================================== */

:root {
  --pub-ink: #0b1220;
  --pub-ink-2: #1e293b;
  --pub-muted: #5b6779;
  --pub-faint: #8b95a7;
  --pub-line: rgba(15, 23, 42, 0.08);
  --pub-line-strong: rgba(15, 23, 42, 0.14);
  --pub-blue: #2563eb;
  --pub-blue-deep: #1d4ed8;
  --pub-surface: rgba(255, 255, 255, 0.86);
  --pub-radius: 20px;
  --pub-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --pub-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px -30px rgba(15, 23, 42, 0.28);
  --pub-shadow-hover: 0 2px 6px rgba(15, 23, 42, 0.05), 0 28px 60px -30px rgba(37, 99, 235, 0.35);
  --pub-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.public-html { scroll-behavior: smooth; }

.public-body {
  background: #f7f9fc;
  color: var(--pub-muted);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.public-body ::selection { background: rgba(37, 99, 235, 0.18); color: #0b1220; }

/* ---------------------------------------------------------------- backdrop */
.public-body .bg-grid {
  opacity: 0.55;
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(75% 60% at 50% 0%, #000 25%, transparent 100%);
  mask-image: radial-gradient(75% 60% at 50% 0%, #000 25%, transparent 100%);
}

.public-body .animate-blob,
.public-body .animate-blob-reverse {
  opacity: 0.5;
  filter: blur(130px) !important;
}

/* ---------------------------------------------------------- scroll progress */
.pub-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #2563eb, #06b6d4 55%, #6366f1);
  transition: transform 0.12s linear;
  pointer-events: none;
  z-index: 2;
}

/* ------------------------------------------------------------------- navbar */
.pub-nav {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  transition: background-color 0.25s var(--pub-ease), box-shadow 0.25s var(--pub-ease), border-color 0.25s var(--pub-ease);
}

.pub-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 32px -22px rgba(15, 23, 42, 0.4);
}

.pub-nav nav a {
  position: relative;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.pub-nav nav a:hover { color: var(--pub-ink); }

.pub-nav nav a[class*="text-blue-600"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  opacity: 0.9;
}

/* ------------------------------------------------------------------ buttons */
.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.22s var(--pub-ease), box-shadow 0.22s var(--pub-ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}

.pub-btn:hover { transform: translateY(-1px); }
.pub-btn:active { transform: translateY(0) scale(0.985); }

.pub-btn--dark {
  background: linear-gradient(180deg, #1b2536, #0b1220);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.4), 0 12px 26px -14px rgba(11, 18, 32, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.pub-btn--dark:hover {
  background: linear-gradient(180deg, #24334a, #101a2b);
  box-shadow: 0 2px 4px rgba(11, 18, 32, 0.35), 0 20px 40px -18px rgba(37, 99, 235, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pub-btn--primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.35), 0 14px 30px -14px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.pub-btn--primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.3), 0 22px 44px -18px rgba(37, 99, 235, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pub-btn--light {
  background: #fff;
  color: var(--pub-ink);
  border: 1px solid var(--pub-line-strong);
  box-shadow: var(--pub-shadow-xs);
}
.pub-btn--light:hover { border-color: rgba(37, 99, 235, 0.3); box-shadow: 0 10px 24px -16px rgba(15, 23, 42, 0.4); }

/* ------------------------------------------------------------------ eyebrow */
.pub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(224, 238, 255, 0.9));
  border: 1px solid rgba(37, 99, 235, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 14px -10px rgba(37, 99, 235, 0.5);
}

/* --------------------------------------------------------------------- hero */
.hero-mesh {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(900px 460px at 50% -8%, rgba(37, 99, 235, 0.1), transparent 68%),
    radial-gradient(700px 380px at 90% 8%, rgba(6, 182, 212, 0.08), transparent 65%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 55%, #f8fafc 100%);
}

.hero-mesh::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 65% at 50% 0%, #000 20%, transparent 100%);
  mask-image: radial-gradient(70% 65% at 50% 0%, #000 20%, transparent 100%);
}

.hero-mesh h1 {
  font-size: clamp(2.25rem, 4.6vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.hero-mesh h1.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5.15rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-mesh p {
  text-wrap: pretty;
}

.hero-title {
  font-size: clamp(2.4rem, 6.1vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

@media (max-width: 640px) {
  .hero-title,
  .hero-mesh h1.hero-title { font-size: clamp(2.1rem, 9.6vw, 2.9rem); line-height: 1.06; }
}

/* Fixed-header anchor offset */
.public-body :where(section, div, h2, h3)[id] { scroll-margin-top: 96px; }

/* --------------------------------------------------------------- cards (DS) */
.herd-card {
  position: relative;
  background: var(--pub-surface);
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius);
  box-shadow: var(--pub-shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.28s var(--pub-ease), box-shadow 0.28s var(--pub-ease), border-color 0.28s var(--pub-ease), background-color 0.28s var(--pub-ease);
  will-change: transform;
}

.herd-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
}

.herd-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: var(--pub-shadow-hover);
  background: rgba(255, 255, 255, 0.94);
}

.herd-card:active { transform: translateY(-1px); }

.public-body .shadow-soft { box-shadow: var(--pub-shadow); }

/* Unified icon tile inside cards */
.pub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(239, 246, 255, 0.9), rgba(219, 234, 254, 0.75));
  border: 1px solid rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 14px -10px rgba(37, 99, 235, 0.6);
}

/* ------------------------------------------------------------------- badges */
.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.pub-badge--blue { color: #1d4ed8; background: #eff6ff; border-color: #dbeafe; }
.pub-badge--green { color: #047857; background: #ecfdf5; border-color: #d1fae5; }
.pub-badge--amber { color: #b45309; background: #fffbeb; border-color: #fef3c7; }

/* --------------------------------------------------------------------- FAQ */
.faq-card {
  background: #fff;
  border: 1px solid var(--pub-line);
  border-radius: 18px;
  box-shadow: var(--pub-shadow-xs);
  transition: border-color 0.22s var(--pub-ease), box-shadow 0.22s var(--pub-ease), background-color 0.22s var(--pub-ease);
}

.faq-card:hover { border-color: rgba(37, 99, 235, 0.18); box-shadow: 0 14px 30px -22px rgba(15, 23, 42, 0.35); }
.faq-card.is-open { border-color: rgba(37, 99, 235, 0.26); box-shadow: 0 18px 40px -26px rgba(37, 99, 235, 0.4); }

.faq-answer { overflow: hidden; }

/* ------------------------------------------------------------------ pricing */
.pricing-card {
  background: #fff;
  border: 1px solid var(--pub-line);
  border-radius: 24px;
  box-shadow: var(--pub-shadow);
  transition: transform 0.28s var(--pub-ease), box-shadow 0.28s var(--pub-ease), border-color 0.28s var(--pub-ease);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--pub-shadow-hover); border-color: rgba(37, 99, 235, 0.2); }
.pricing-card--featured {
  border: 1.5px solid rgba(37, 99, 235, 0.45);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08), 0 30px 70px -34px rgba(37, 99, 235, 0.55);
}

/* -------------------------------------------------------------------- forms */
.public-body .form-input,
.public-body .input,
.public-body select,
.public-body textarea {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.public-body .form-input:focus,
.public-body .input:focus,
.public-body textarea:focus,
.public-body select:focus {
  border-color: rgba(37, 99, 235, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
  background: #fff !important;
}

/* ------------------------------------------------------------------- footer */
.pub-footer {
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(37, 99, 235, 0.05), transparent 70%),
    #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.pub-footer a { transition: color 0.18s ease, transform 0.18s ease; }
.pub-footer a:hover { color: #1d4ed8; }

.pub-footer .pub-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--pub-ease);
}
.pub-footer .pub-social:hover { background: #2563eb; color: #fff; transform: translateY(-2px); }

/* --------------------------------------------------------------- legal prose */
.legal-prose :where(p, li) { color: #475569; line-height: 1.75; }
.legal-prose :where(h2, h3) { letter-spacing: -0.02em; color: var(--pub-ink); }
.legal-prose a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; }
.legal-prose a:hover { color: #1e40af; }
.legal-prose code { background: #eff6ff; color: #1d4ed8; border-radius: 6px; padding: 1px 6px; font-size: 0.85em; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1023px) {
  .pub-nav { background: rgba(255, 255, 255, 0.9); }
  .herd-card:hover { transform: none; }
}

/* ------------------------------------------------------- reduced motion / a11y */
@media (prefers-reduced-motion: reduce) {
  .herd-card,
  .faq-card,
  .pricing-card,
  .pub-btn {
    transition: none !important;
    transform: none !important;
  }
  .pub-progress { transition: none; }
}

.public-body a:focus-visible,
.public-body button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
  border-radius: 8px;
}

/* -------------------------------------------------------------- CTA band */
.pub-cta { padding: 0 1rem 4.5rem; position: relative; z-index: 10; }

.pub-cta__inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  padding: 3.6rem 2rem;
  background:
    radial-gradient(680px 320px at 50% -20%, rgba(37, 99, 235, 0.5), transparent 70%),
    linear-gradient(135deg, #0b1220 0%, #101c31 55%, #0c2038 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px -55px rgba(11, 18, 32, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pub-cta__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(65% 80% at 50% 50%, #000 15%, transparent 100%);
  mask-image: radial-gradient(65% 80% at 50% 50%, #000 15%, transparent 100%);
}

.pub-cta__glow {
  position: absolute;
  top: -60%;
  left: 50%;
  width: 760px;
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.22), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.pub-cta__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.pub-cta__title {
  margin: 1rem auto 0.75rem;
  max-width: 44rem;
  color: #fff;
  font-size: clamp(1.75rem, 3.1vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.pub-cta__lede {
  margin: 0 auto;
  max-width: 40rem;
  color: rgba(203, 213, 225, 0.78);
  font-size: 0.92rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.pub-cta__ghost {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(255, 255, 255, 0.03);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--pub-ease);
}
.pub-cta__ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(226, 232, 240, 0.4);
  transform: translateY(-1px);
}

.pub-cta__note {
  margin-top: 1.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.8);
}

@media (max-width: 640px) {
  .pub-cta { padding: 0 0.85rem 3rem; }
  .pub-cta__inner { padding: 2.6rem 1.25rem; border-radius: 22px; }
}

/* FAQ answer reveal (class-driven so it never depends on transition JS) */
.faq-answer { animation: pub-faq-in 0.22s var(--pub-ease) both; }

@keyframes pub-faq-in {
  from { transform: translateY(-4px); }
  to { transform: translateY(0); }
}

/* ------------------------------------------- Ultra-Premium Landing Page Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}
@keyframes float-delay-1 {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
@keyframes float-delay-2 {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delay-1 { animation: float-delay-1 8s ease-in-out infinite 1s; }
.animate-float-delay-2 { animation: float-delay-2 7s ease-in-out infinite 2s; }
.animate-fade-in-up { animation: fade-in-up 0.8s ease-out forwards; }

.floating-card-shadow {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
}

/* ------------------------------------------- Dual-Tier Adaptive Viewport Architecture
   Calibrated for Windows Display Scaling (100% Scale @ 1920x1080 & 125% Zoom @ 1536x864)
   Eliminates horizontal voids on wide panels while preserving above-the-fold fit on laptops.
-------------------------------------------------------------------------------------- */
.site-container-adaptive {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem; /* 1280px default (matches max-w-7xl) */
}

@media (min-width: 1680px) {
  .site-container-adaptive {
    max-width: 1540px !important;
  }
  .hero-title-adaptive {
    font-size: 52px !important;
    line-height: 1.08 !important;
    margin-bottom: 20px !important;
  }
  .hero-desc-adaptive {
    font-size: 16.5px !important;
    line-height: 1.65 !important;
    max-width: 560px !important;
    margin-bottom: 26px !important;
  }
  .hero-dashboard-adaptive {
    max-width: 960px !important;
  }
  .hero-cta-adaptive {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
    font-size: 15px !important;
  }
}

@media (min-width: 1880px) {
  .site-container-adaptive {
    max-width: 1580px !important;
  }
  .hero-title-adaptive {
    font-size: 58px !important;
    line-height: 1.06 !important;
  }
  .hero-desc-adaptive {
    max-width: 600px !important;
    font-size: 17px !important;
  }
  .hero-dashboard-adaptive {
    max-width: 1040px !important;
  }
}

/* Custom styling for ROI Calculator Slider & Modern Enterprise Accents */
input[type=range].pub-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  outline: none;
}
input[type=range].pub-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
input[type=range].pub-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: #1d4ed8;
}
input[type=range].pub-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .faq-answer { animation: none; }
  .animate-float, .animate-float-delay-1, .animate-float-delay-2, .animate-fade-in-up { animation: none !important; }
}
