/* ===================================================================
   FRANCISCO LABS — MOBILE UI ENHANCEMENTS
   Scroll nav chips, frozen bottom bar, ROI section, FAB
   =================================================================== */

/* ─── SCROLL NAV CHIPS ──────────────────────────────────────────── */
.scroll-nav {
  position: fixed;
  top: 64px; /* sits right below the nav */
  left: 0;
  right: 0;
  z-index: 95;
  /* Hidden until scrolled past hero */
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition:
    opacity 0.28s cubic-bezier(0.22,1,0.36,1),
    transform 0.28s cubic-bezier(0.22,1,0.36,1);
  background: rgba(10,10,11,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.scroll-nav.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-nav__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem clamp(1rem, 5vw, 2rem);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, black 85%, transparent 100%);
}
.scroll-nav__inner::-webkit-scrollbar { display: none; }

.scroll-nav__chip {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.35rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  text-decoration: none;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}
.scroll-nav__chip:hover,
.scroll-nav__chip.active {
  color: var(--color-text);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}
.scroll-nav__chip--cta {
  background: var(--color-primary);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.scroll-nav__chip--cta:hover {
  background: var(--color-primary-bright);
  color: #fff;
  border-color: transparent;
}

/* ─── FROZEN BOTTOM BAR ─────────────────────────────────────────── */
.bottom-bar {
  display: none; /* mobile only — shown via media query */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(10,10,11,0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 0.625rem 1rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
  flex-direction: row;
  align-items: center;
  gap: 0;
  /* Slide up on load */
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.22,1,0.36,1),
    opacity 0.3s ease;
}
.bottom-bar.visible {
  transform: translateY(0);
  opacity: 1;
}

.bottom-bar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition:
    background 0.18s ease,
    transform 0.12s ease;
}
.bottom-bar__btn:active { transform: scale(0.97); }

.bottom-bar__btn--call {
  background: rgba(255,255,255,0.06);
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.1);
}
.bottom-bar__btn--call:hover { background: rgba(255,255,255,0.1); }

.bottom-bar__btn--email {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 20px rgba(37,99,235,0.35);
}
.bottom-bar__btn--email:hover { background: var(--color-primary-bright); }

.bottom-bar__divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
  margin-inline: 0.5rem;
}

/* Add bottom padding to body so content isn't hidden behind bottom bar */
@media (max-width: 768px) {
  .bottom-bar { display: flex; }
  body { padding-bottom: 80px; }
}

/* FAB back-to-top styles moved to drawer.css (Bob Top system) */

/* ─── ROI SECTION ───────────────────────────────────────────────── */
.roi-section {
  padding-block: clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}
.roi-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

/* Subtle background glow */
.roi-section::after {
  content: '';
  position: absolute;
  width: 700px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(37,99,235,0.07) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.roi-section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--color-text);
  margin-block: var(--space-4) var(--space-3);
}
.roi-section__sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin: 0 auto var(--space-10);
  line-height: 1.65;
}

/* Grid: featured card spans 2 cols, then 2+2 */
.roi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}
.roi-card--featured {
  grid-column: 1 / 3;
}

.roi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.roi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 100%, rgba(37,99,235,0.05), transparent 60%);
  pointer-events: none;
}
.roi-card:hover {
  border-color: rgba(37,99,235,0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2), 0 0 0 1px rgba(37,99,235,0.06);
}

.roi-card__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-bright);
  margin-bottom: var(--space-2);
}
.roi-card__num {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.roi-card__num--accent {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 60%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.roi-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* Progress bar in featured card */
.roi-card__bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: var(--space-4);
}
.roi-card__bar-fill {
  height: 100%;
  background: linear-gradient(to right, #2563eb, #60a5fa);
  border-radius: 2px;
  animation: bar-grow 1.4s cubic-bezier(0.22,1,0.36,1) both;
  animation-play-state: paused;
}
.roi-card.in-view .roi-card__bar-fill {
  animation-play-state: running;
}
@keyframes bar-grow {
  from { width: 0 !important; }
  to { /* width set inline */ }
}

.roi-cta {
  display: flex;
  justify-content: center;
  margin-top: var(--space-10);
}

/* ─── ROI RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .roi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .roi-card--featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .roi-section { padding-block: 3rem; }
  .roi-section__heading { font-size: 1.75rem; }
  .roi-section__sub { font-size: 0.875rem; margin-bottom: var(--space-6); }

  .roi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
  }
  .roi-card--featured {
    grid-column: 1 / -1;
  }
  .roi-card {
    padding: 1rem;
    border-radius: 14px;
  }
  .roi-card__num {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
  .roi-card__desc { font-size: 0.75rem; }

  .roi-cta .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
  }
}

/* ─── SCROLL NAV — show on both desktop + mobile ────────────────── */
/* On desktop it adds context without being intrusive */
@media (min-width: 769px) {
  .scroll-nav__inner {
    -webkit-mask-image: none;
    mask-image: none;
    justify-content: center;
  }
  .scroll-nav__chip { font-size: 0.875rem; padding: 0.4rem 1rem; }
}

/* ─── MOBILE: suppress scroll-nav chips ─────────────────────────── */
/* The FAB drawer fully replaces scroll-nav on mobile.
   Chips remain on desktop where they add useful quick-jump context. */
@media (max-width: 900px) {
  .scroll-nav {
    display: none !important;
  }
}
