/* Shared feature page visuals */

/* Light section surface (waves + .fp-section-light stay in sync) */
:root {
  --fp-section-light-bg: #f5f7fb;
}


/* ==========================================================================
   Luminary — clean parallax background (alternative to cosmos).
   A static composition of three atmospheric glow zones on deep navy,
   with a barely-there dot grid for tactile depth. No animation.
   Parallax comes from position:fixed on ::before — page content scrolls
   over the pinned background, creating natural depth without iOS jank.
   ========================================================================== */

main.fp-luminary-main {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  overflow-y: clip;
}

main.fp-luminary-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* Top-left bloom — Bootstrap primary blue */
    radial-gradient(
      ellipse 110% 90% at 8% 12%,
      rgba(13, 110, 253, 0.22) 0%,
      rgba(13, 110, 253, 0.14) 30%,
      rgba(13, 110, 253, 0.05) 65%,
      transparent 85%
    ),
    /* Right-center blue halo */
    radial-gradient(
      ellipse 100% 85% at 92% 42%,
      rgba(59, 130, 246, 0.20) 0%,
      rgba(59, 130, 246, 0.12) 32%,
      rgba(59, 130, 246, 0.04) 65%,
      transparent 82%
    ),
    /* Lower-center deeper blue — grounds the composition */
    radial-gradient(
      ellipse 120% 70% at 46% 100%,
      rgba(30, 64, 175, 0.22) 0%,
      rgba(30, 64, 175, 0.13) 35%,
      rgba(30, 64, 175, 0.04) 65%,
      transparent 82%
    ),
    /* Deep navy base — matches cosmos palette */
    linear-gradient(158deg, #0f2040 0%, #132855 52%, #173060 100%);
}

/* Dot grid rendered by luminary-grid Stimulus controller (canvas) */


/* ==========================================================================
   Dark section — secondary sections background (sits on fp-luminary-main bg)
   Light section — card surface
   ========================================================================== */

.fp-section-light {
  background: var(--fp-section-light-bg);
}

/* Homepage: hero phone bleeds into this section on small screens — sit below stacking context */
@media (max-width: 991.98px) {
  #features.fp-features-home {
    position: relative;
    z-index: 1;
    /* Matches the margin-bottom bleed on .fp-hero-device-stack:
       0.4 × min(304px, 82vw) ≈ 122px + generous breathing room before the heading. */
    padding-top: clamp(8rem, 26vw, 10rem);
  }

  #features.fp-features-home > .container {
    padding-top: 0;
  }
}

@media (max-width: 575.98px) {
  #features.fp-features-home {
    padding-top: clamp(7.5rem, 28vw, 9.5rem);
  }
}

/* ==========================================================================
   Small glass card (lightweight, for benefit / feature grids on dark bg)
   ========================================================================== */

.fp-card-glass-sm {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.2s ease;
}

.fp-card-glass-sm:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(13, 110, 253, 0.4) !important;
  transform: translateY(1%) scale(1.02);
  transition: all 0.2s ease !important;
}

/* Pricing cards — override generic glass hover to match fp-pricing-pro lift */
#pricing .fp-card-glass-sm:hover {
  transform: translateY(-1%) scale(0.94);
  transition: all 0.2s ease !important;
}

/* ==========================================================================
   Light card variant (for use on fp-section-light backgrounds)
   ========================================================================== */

.fp-card-light {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.2s ease;
}

.fp-card-light:hover {
  border-color: rgba(13, 110, 253, 0.25) !important;
  box-shadow:
    0 6px 24px rgba(13, 110, 253, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-3px);
  transition: all 0.2s ease !important;
}

/* Dark card variant (for use on dark/gradient backgrounds) */
.fp-card-dark {
  transition: all 0.2s ease;
}

.fp-card-dark:hover {
  border-color: rgba(255, 255, 255, 0.5) !important;
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(255, 255, 255, 0.05) !important;
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.18) !important;
  transition: all 0.2s ease !important;
}

/* ==========================================================================
   Icon circles for dark backgrounds
   ========================================================================== */

.fp-icon-circle {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.fp-icon-circle i,
.fp-icon-circle-light i {
  line-height: 1;
  display: block;
}

/* ==========================================================================
   Feature highlight visual placeholder (dark bg, for the icon display area)
   ========================================================================== */

.fp-highlight-visual {
  background: rgba(13, 110, 253, 0.08);
  border: 1px solid rgba(13, 110, 253, 0.18);
}

/* ==========================================================================
   Spacing utilities (py-lg-6 missing from Bootstrap defaults)
   ========================================================================== */

@media (min-width: 992px) {
  .py-lg-6 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }
}

/* ==========================================================================
   Gloss overlay — white glass tint matching fp-card-glass-sm, with a subtle
   top-edge sheen baked into the gradient (no ::before, avoids conflicts with
   sections that have their own pseudo-elements like fp-cta-aurora).
   ========================================================================== */

.gloss-overlay {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(13, 110, 253, 0.05) 0%,
    rgba(13, 110, 253, 0.03) 30%,
    rgba(13, 110, 253, 0.03) 100%
  );
  border-top: 1px solid rgba(13, 110, 253, 0.12);
  border-bottom: 1px solid rgba(13, 110, 253, 0.06);
}

/* ==========================================================================
   Sticky header — applies when marketing CSS is bundled (public pages only).

   NOTE: backdrop-filter intentionally omitted — it creates a new containing
   block for fixed-position children, which breaks the mobile offcanvas drawer.
   ========================================================================== */

header.header.navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: rgba(8, 20, 40, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* On large screens the offcanvas becomes inline — its bg-dark child would
   otherwise show a different shade from the header background. */
@media (min-width: 992px) {
  header.header.navbar .offcanvas-body {
    background-color: transparent !important;
  }
}

/* ==========================================================================
   Pricing card variants for dark pages
   ========================================================================== */

.fp-pricing-popular {
  background: rgba(13, 110, 253, 0.12);
  border: 1px solid rgba(13, 110, 253, 0.45) !important;
  box-shadow:
    0 0 40px rgba(13, 110, 253, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.fp-pricing-popular:hover {
  background: rgba(13, 110, 253, 0.18) !important;
  border-color: rgba(13, 110, 253, 0.65) !important;
  box-shadow:
    0 0 52px rgba(13, 110, 253, 0.28),
    0 12px 36px rgba(0, 0, 0, 0.45);
  transform: translateY(-3px);
  transition: all 0.2s ease !important;
}

.fp-pricing-pro {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #2d2416 100%);
  border: 1px solid rgba(255, 193, 7, 0.45) !important;
  box-shadow:
    0 0 40px rgba(255, 193, 7, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.fp-pricing-pro:hover {
  background: linear-gradient(
    135deg,
    #0d0b00 0%,
    #1f1a00 50%,
    #2d2416 100%
  ) !important;
  border-color: rgba(255, 193, 7, 0.85) !important;
  box-shadow:
    0 0 0 4px rgba(255, 193, 7, 0.12),
    0 0 40px 8px rgba(255, 193, 7, 0.35),
    0 12px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-1%) scale(0.94);
  transition: all 0.2s ease !important;
}

@media (min-width: 992px) {
  .fp-card-md-small {
    transform: scale(0.94);
  }
}

/* ==========================================================================
   Home hero — light-to-dark gradient with offset image stack.
   ========================================================================== */

.fp-hero-home {
  position: relative;
  z-index: 2;
  /* Devices may extend past the inner container */
  overflow: visible;
  /* Overall hero band height — cosmos shows through; wave sits on the bottom edge */
  min-height: 700px;
}

/* Above .fp-wave-overlay (z-index: 2) so copy + device mockups sit over the curved divider */
.fp-hero-home-inner {
  position: relative;
  z-index: 3;
}

/* Mobile: no extra band below the device column — height comes from the image + wave */
@media (max-width: 991.98px) {
  .fp-hero-home-inner {
    padding-bottom: 0;
  }
}

/* Content row min-height: desktop aligns copy + device stack; mobile uses natural height */
@media (min-width: 992px) {
  .fp-hero-home-row {
    min-height: 560px;
  }
}

/* Tablet + phone: height follows content — fixed min-heights were leaving a dead band above the phone */
@media (max-width: 991.98px) {
  .fp-hero-home {
    min-height: 0;
  }

  .fp-hero-home-row {
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 0;
    column-gap: 0;
  }
}

.fp-hero-home::after,
.fp-hero-bloom::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='250' height='250' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 250px 250px;
}

/* Home hero — device stack (iPad behind, iPhone in front on lg+) */
.fp-hero-device-col {
  overflow: visible;
}

@media (max-width: 991.98px) {
  .fp-hero-device-col {
    /* Column height = stack height only (no stretch / extra band) */
    padding-top: 0;
    padding-bottom: 0;
    align-self: flex-start;
    flex: 0 0 auto;
    width: 100%;
  }
}

.fp-hero-device-stack {
  position: relative;
  min-height: 300px;
  padding: 8px 0 28px;
}

@media (max-width: 991.98px) {
  .fp-hero-device-stack {
    min-height: 0;
    padding: 0;
    line-height: 0; /* remove stray gap under img */
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    /* Bleed ~40% of the phone's width (≈22% of its height) below the wave into
       the features section. #features padding-top is sized to match. */
    margin-bottom: calc(-0.4 * min(304px, 82vw));
  }
}

@media (min-width: 992px) {
  .fp-hero-device-col {
    /* Let mockups extend past the column / container gutter */
    padding-right: 0;
  }

  .fp-hero-device-stack {
    position: relative;
    min-height: 520px;
    padding: 32px 0 56px;
    /* Widen and offset so art can bleed without staying inside the col box */
    width: calc(100% + min(18vw, 10rem));
    max-width: none;
    margin-left: min(-3rem, -4vw);
    margin-right: min(-4rem, -6vw);
  }
}

/* iPad: back layer, desktop only — left-aligned so the full UI stays readable */
.fp-hero-device-ipad {
  position: absolute;
  left: 0;
  top: 50%;
  width: 86%;
  max-width: 560px;
  z-index: 3;
  object-fit: contain;
  object-position: left center;
  transform: translateY(-50%);
}

@media (min-width: 992px) {
  .fp-hero-device-ipad {
    left: -10%;
    width: 125%;
    max-width: 860px;
    transform: translateY(-48%);
  }
}

/* iPhone: front layer — mobile: centered, stacked under copy */
.fp-hero-device-iphone {
  position: relative;
  z-index: 4;
  display: block;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

/* Part of the handset sits below the wave; #features gets padding to clear it */
@media (max-width: 991.98px) {
  .fp-hero-device-iphone {
    /* Slightly smaller than desktop cap; stack is width: fit-content so the col hugs the bitmap */
    max-width: min(304px, 82vw);
    width: auto;
    height: auto;
    margin-left: 0;
    margin-right: 0;
    /*
      No transform or negative margin-top here — those caused the image to overlap the
      CTA buttons above. Instead, negative margin-bottom on .fp-hero-device-stack bleeds
      the bottom of the phone into the features section below, which already has extra
      padding-top to clear it.
    */
  }
}

@media (min-width: 992px) {
  /* iPhone: larger, anchored bottom-right with offset past the stack edge */
  .fp-hero-device-iphone {
    position: absolute;
    right: -22%;
    bottom: 5%;
    left: auto;
    top: auto;
    width: 42%;
    max-width: 320px;
    margin: 0;
    object-position: right bottom;
  }
}

.fp-hero-bloom {
  position: relative; /* needed for ::after noise texture */
}

/* ==========================================================================
   Home hero — real photo with directional dark overlay.
   background-image set via inline style in template (requires asset_path helper).
   ========================================================================== */

.fp-hero-photo {
  background-color: #060f22; /* fallback while image loads */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ==========================================================================
   Glossy CTA — frosted-glass panel with shimmer border lines.
   ========================================================================== */

/* Inner content container for CTA aurora sections */
.fp-cta-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 660px;
  margin: 0 auto;
}

/* ==========================================================================
   Light icon circle — tonal primary surface for use on white backgrounds
   ========================================================================== */

.fp-icon-circle-light {
  background: rgba(13, 110, 253, 0.08);
  border: 1px solid rgba(13, 110, 253, 0.12);
}

/* ==========================================================================
   Hero wave — bottom curve from hero into the first light section only.
   Mid-page transitions are flat. Path fill uses --fp-wave-to (light surface).
   ========================================================================== */

.fp-wave {
  --fp-wave-from: transparent;
  --fp-wave-to: var(--fp-section-light-bg);
  display: block;
  line-height: 0;
  overflow: hidden;
  margin-top: -1px; /* prevent hairline sub-pixel gap */
  background: var(--fp-wave-from);
}

.fp-wave svg {
  display: block;
  width: 100%;
  height: 60px;
}

.fp-wave path {
  fill: var(--fp-wave-to);
}

/* Attach a wave directly to a hero so it inherits the hero bg naturally. */
.fp-wave-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 2;
  margin-top: 0;
  background: transparent;
  pointer-events: none;
}

.fp-wave-overlay svg {
  height: 110px;
}

@media (max-width: 767.98px) {
  .fp-wave svg {
    height: 28px;
  }

  .fp-wave-overlay svg {
    height: 34px;
  }
}

/* ==========================================================================
   Light-section social proof logo strip
   ========================================================================== */

.fp-logo-strip-light .fp-card-glass-sm {
  background: #f4f7ff !important;
  border: 1px solid rgba(13, 110, 253, 0.08) !important;
}

.fp-logo-strip-light .fp-card-glass-sm:hover {
  border-color: rgba(13, 110, 253, 0.2) !important;
  background: #edf2ff !important;
}

/* Dark card: strip uses !important light styles — raise specificity so Bootstrap bg-dark applies */
.fp-logo-strip-light .fp-card-glass-sm.bg-dark {
  background-color: var(--bs-dark) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.fp-logo-strip-light .fp-card-glass-sm.bg-dark:hover {
  background-color: var(--bs-gray-900) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ==========================================================================
   Star Ratings Booster — hero + flow diagram
   ========================================================================== */

/* Split hero background: full blue, white clipped to left with angled edge */
.srb-hero-section {
  background: #ffffff;
}

@media (max-width: 991.98px) {
  .srb-copy-col {
    border-bottom: 1px solid rgba(13, 110, 253, 0.15);
    padding-bottom: 2.5rem;
  }
}

@media (min-width: 992px) {
  /* Full section is blue; white pseudo-element covers the left with a diagonal cut */
  .srb-hero-section {
    background: #E2EEFF;
  }

  .srb-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: calc(50vw - 120px);
    background: #ffffff;
    z-index: 0;
  }
}


/* Hero badge pill */
.srb-hero-badge {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  border: 1px solid rgba(13, 110, 253, 0.25);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4em 1em;
}

/* Flow node cards (top two) — blue tint matching branch pill style */
.srb-flow-node-primary {
  background: #ffffff;
  border: 1.5px solid #BFDBFE;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.srb-flow-node-icon {
  color: #1D4ED8;
}

.srb-flow-node-text {
  color: #1e3a8a;
}

.srb-flow-node-subtext {
  color: #3B82F6;
}

/* Arrow icons between cards */
.srb-flow-arrow-icon {
  color: #0d1117;
  font-size: 1.4rem;
}

.srb-branch-row {
  gap: 0;
}

.srb-branch-label {
  flex: 1;
}

/* Secondary palette for recovery path (1-4 stars) */
.srb-branch-low {
  background: #FEF0EC;
  border: 1.5px solid #F9BBA8;
}

/* Emerald palette for success path (5 stars) */
.srb-branch-high {
  background: #ECFDF5;
  border: 1.5px solid #6EE7B7;
}

.srb-outcome-card {
  flex: 1;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.srb-outcome-low {
  background: #FEF0EC;
  border: 1.5px solid #F9BBA8;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.srb-outcome-high {
  background: #ECFDF5;
  border: 1.5px solid #6EE7B7;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.08);
}

/* Icon circles inside outcome cards */
.srb-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.srb-icon-circle-low  { background: rgba(233, 81, 41, 0.12); }
.srb-icon-circle-high { background: rgba(16, 185, 129, 0.12); }
.srb-icon-circle-blue { background: rgba(13, 110, 253, 0.12); }

/* Review platform logos */
.srb-review-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.2s ease;
}
.srb-review-logo:hover {
  transform: scale(1.12);
}

@keyframes srb-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.srb-animate {
  animation: srb-fade-up 0.8s ease both;
}

/* ==========================================================================
   Feature page hero — single screenshot offset layout (SEO page)
   ========================================================================== */

.fp-hero-seo-col {
  overflow: visible;
}

.fp-hero-seo-frame {
  position: relative;
  padding: 1.5rem 0;
}

.fp-hero-seo-screenshot {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

@media (max-width: 991.98px) {
  .fp-hero-seo-col {
    padding-top: 1.5rem;
    padding-bottom: 0;
    align-self: flex-end;
    width: 100%;
  }

  .fp-hero-seo-frame {
    padding: 1rem 0 0;
  }
}

@media (min-width: 992px) {
  .fp-hero-seo-col {
    padding-right: 0;
  }

  .fp-hero-seo-frame {
    min-height: 480px;
    width: calc(100% + min(16vw, 9rem));
    max-width: none;
    margin-left: min(-2rem, -3vw);
    margin-right: min(-4rem, -6vw);
  }

  .fp-hero-seo-screenshot {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    transform: translateY(-40%);
  }
}
