/* ─── Base ─────────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ─── Container Width Override ─────────────────────────────────────── */
/* Match babal.host scale — fills viewport up to 1536px (same as max-w-screen-2xl) */
.max-w-7xl {
    max-width: 1536px !important;
}

/* ─── Stacking cards: responsive internal padding ───────────────────── */
/* Overrides Tailwind p-12 (48px) / p-8 (32px) which are too large      */
/* on small screens where cards render as a single column                */
@media (max-width: 639px) {
    .sf-card > div > div {
        padding: 1.5rem !important; /* 24px */
    }
    .sf-card h3 {
        font-size: 1.5rem   !important; /* text-2xl */
        line-height: 1.3    !important;
    }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .sf-card > div > div {
        padding: 2rem !important; /* 32px */
    }
    .sf-card h3 {
        font-size: 1.875rem !important; /* text-3xl */
        line-height: 1.25   !important;
    }
}

/* ─── Steps rail: hide labels on very small screens to prevent overflow  */
@media (max-width: 479px) {
    #sf-rail-lbl-0,
    #sf-rail-lbl-1,
    #sf-rail-lbl-2,
    #sf-rail-lbl-3 {
        display: none !important;
    }
    #sf-steps-rail .flex.items-center.gap-3 {
        gap: 0.5rem !important;
    }
    #sf-steps-rail .w-6.h-px {
        width: 0.625rem !important; /* 10px connector */
    }
}

body {
    background-color: #fbf8ff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Scroll Progress Bar ───────────────────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: rgba(4, 93, 195, 0.72);
    z-index: 9999;
    transition: width 0.08s linear;
    border-radius: 0 2px 2px 0;
}

/* ─── Material Icons ────────────────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ─── Layout ────────────────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

/* ─── Hero ──────────────────────────────────────────────────────────── */
.vps-glow {
    box-shadow: 0 0 40px rgba(35, 77, 218, 0.08);
}

.hero-light-gradient {
    background: radial-gradient(circle at 80% 20%, rgba(82, 113, 255, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(35, 77, 218, 0.05) 0%, transparent 40%),
                #fbf8ff;
}

.ai-pulse-ring {
    box-shadow: 0 0 0 0 rgba(82, 113, 255, 0.4);
    animation: ring-pulse 2s infinite;
}

@keyframes ring-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(82, 113, 255, 0.4); }
    70%  { box-shadow: 0 0 0 15px rgba(82, 113, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(82, 113, 255, 0); }
}

/* ─── Glassmorphism ─────────────────────────────────────────────────── */
.glass-card {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-bubble-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ─── Scroll Reveal Animations ──────────────────────────────────────── */
.reveal {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                filter 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Stagger delays for sibling groups */
.reveal-group > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-group > .reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal-group > .reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal-group > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal-group > .reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal-group > .reveal:nth-child(6) { transition-delay: 0.40s; }

/* ─── Hover Lift Card ───────────────────────────────────────────────── */
.hover-lift {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(82, 113, 255, 0.10), 0 4px 12px rgba(0,0,0,0.06);
}

/* ─── Button Interactions ───────────────────────────────────────────── */
.btn-primary {
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover {
    transform: scale(1.025);
    box-shadow: 0 8px 24px rgba(82, 113, 255, 0.30);
    filter: brightness(1.05);
}
.btn-primary:active {
    transform: scale(0.97);
}

/* ─── Navbar scroll state ───────────────────────────────────────────── */
header.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.95);
}

/* ─── Animated Counter ──────────────────────────────────────────────── */
.counter-value {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ─── Section Label Pattern ─────────────────────────────────────────── */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(82,113,255,0.08);
    color: #5271ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    margin-bottom: 16px;
    border: 1px solid rgba(82,113,255,0.12);
}

/* ─── FAQ Accordion ─────────────────────────────────────────────────── */
.accordion-item[open] .accordion-header svg {
    transform: rotate(45deg);
    color: #5271ff;
}
.accordion-item[open] .accordion-header span {
    color: #5271ff;
}

/* ─── Focus Styles (accessibility) ─────────────────────────────────── */
:focus-visible {
    outline: 2px solid #5271ff;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ─── Text Gradient ─────────────────────────────────────────────────── */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(90deg, #1a2a6c 0%, #3B5BDB 50%, #5271ff 100%);
}

/* ─── Marquee Animation ─────────────────────────────────────────────── */
.animate-marquee {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-container:hover .animate-marquee {
    animation-play-state: paused;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4c5d7; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #5271ff; }

/* ─── Selection ─────────────────────────────────────────────────────── */
::selection {
    background: rgba(82, 113, 255, 0.15);
    color: #1a1b23;
}

/* ─── Reduced Motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .animate-bounce,
    .animate-pulse,
    .ai-pulse-ring,
    .hover-lift {
        animation: none !important;
        transition: none !important;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}

/* ─── Animated AI Hub Section ───────────────────────────────────────── */
.card-border-gradient {
  position: relative;
  background: #151025;
  border: 1px solid rgba(139, 92, 246, 0.2);
  z-index: 2;
}

.glow-aura {
  box-shadow: 0 0 80px 20px rgba(139, 92, 246, 0.5);
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 60px 15px rgba(139, 92, 246, 0.4); }
  50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 100px 30px rgba(139, 92, 246, 0.6); }
}

.connector-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.path-line {
  fill: none;
  stroke: rgba(139, 92, 246, 0.25);
  stroke-width: 1.5;
}

.animated-pulse-path {
  fill: none;
  stroke: url(#line-gradient);
  stroke-width: 2.5;
  stroke-dasharray: 20, 100;
  stroke-linecap: round;
  animation: dashflow 4s linear infinite;
}

@keyframes dashflow {
  from {
    stroke-dashoffset: 120;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.mockup-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── Responsive Fixes ──────────────────────────────────────────────── */

/* AI Hub Section – responsive grid (replaces hardcoded repeat(3,1fr)) */
.ai-hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-left: 16px;
  padding-right: 16px;
}
@media (min-width: 640px) {
  .ai-hub-grid {
    grid-template-columns: repeat(2, 1fr);
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (min-width: 1024px) {
  .ai-hub-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-left: 40px;
    padding-right: 40px;
  }
}
/* Hub spacer spans all columns on every breakpoint */
.ai-hub-grid .ai-hub-spacer {
  grid-column: 1 / -1;
}

/* Migration Slider – collapsed cards on mobile/tablet (< lg = 1024px) */
@media (max-width: 1023px) {
  /* Collapsed cards become compact horizontal rows */
  .migration-card.migration-collapsed .migration-content-collapsed {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    height: auto !important;
    min-height: 72px;
    padding: 16px 20px;
  }
  /* Remove fixed height on the vertical text wrapper */
  .migration-card.migration-collapsed .migration-content-collapsed > div:first-child {
    height: auto !important;
    flex: 1;
  }
  /* Rotate label text back to horizontal */
  .migration-card.migration-collapsed .migration-label {
    writing-mode: horizontal-tb !important;
    transform: none !important;
    font-size: 13px;
    letter-spacing: 0.06em;
  }
  /* Remove the top margin from the icon at the end */
  .migration-card.migration-collapsed .migration-content-collapsed > div:last-child {
    margin-top: 0 !important;
    flex-shrink: 0;
  }
  /* Expanded card inside migration slider – limit height on mobile */
  .migration-card.migration-expanded .migration-content-expanded {
    flex-direction: column;
  }
}

/* Hero – reduce excessive bottom padding on md screens (right column hidden) */
@media (min-width: 640px) and (max-width: 1023px) {
  .hero-light-gradient {
    padding-bottom: 4rem !important;
  }
}

/* Pricing tabs – allow horizontal scroll on small screens */
@media (max-width: 767px) {
  #pricing-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}
/* ─── FAQ Accordion ─────────────────────────────────────────────────── */
/* Numbered items via CSS counter */
.mero-faq-wrap {
  counter-reset: faq-counter;
  border: 1px solid rgba(196,197,215,0.45);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 32px rgba(82,113,255,0.08), 0 1px 4px rgba(82,113,255,0.04);
  overflow: hidden;
}

.mero-faq-item {
  counter-increment: faq-counter;
  border-bottom: 1px solid rgba(196,197,215,0.35);
  transition: background 0.22s ease, border-left-color 0.22s ease;
}
.mero-faq-item:last-child { border-bottom: none; }
.mero-faq-item.open {
  background: linear-gradient(100deg, #eef1ff 0%, #f6f8ff 60%, #fafbff 100%);
  border-left: 4px solid #5271ff;
}

/* Button layout: [counter] [question text] [chevron] */
.mero-faq-btn {
  width: 100%; text-align: left;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 22px 24px 22px 24px;
  font-size: 16.5px; font-weight: 600; color: #1a1b2e; line-height: 1.6;
  background: transparent; border: none; cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.mero-faq-btn:hover { color: #5271ff; background: rgba(82,113,255,0.03); }
.mero-faq-btn:focus-visible { outline: 2px solid #5271ff; outline-offset: -2px; }

/* Number badge */
.mero-faq-btn::before {
  content: counter(faq-counter, decimal-leading-zero);
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em;
  color: rgba(82,113,255,0.45);
  flex-shrink: 0; min-width: 24px; padding-top: 3px;
  transition: color 0.2s ease;
}
.mero-faq-item.open .mero-faq-btn::before { color: #5271ff; }

/* Question text fills remaining space */
.mero-faq-btn > span:first-of-type { flex: 1; }

/* Answer panel — max-height animated via JS inline styles only */
.mero-faq-answer {
  max-height: 0; overflow: hidden;
  padding: 0 24px 0 62px; /* constant — left indent aligns with question text */
  /* No padding/other transition here — JS controls max-height exclusively */
  font-size: 15.5px; color: #4d4e65; line-height: 1.88;
}
.mero-faq-answer.open { /* no padding toggle — avoids instant jump on class removal */ }
.mero-faq-answer p { margin: 6px 0 22px; } /* spacing baked into scrollHeight measurement */

.mero-faq-icon {
  font-size: 22px; color: rgba(82,113,255,0.6);
  flex-shrink: 0; margin-top: 1px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}
.mero-faq-item.open .mero-faq-icon {
  transform: rotate(180deg);
  color: #5271ff;
}
.mero-faq-item.open .mero-faq-btn { color: #5271ff; }

/* ── Hover states (replacing inline onmouseenter/onmouseleave handlers,
      which are blocked by the site CSP script-src 'self') ─────────────────── */
[data-hover="scale"] { transition: transform 0.3s; }
[data-hover="scale"]:hover { transform: scale(1.02); }
[data-hover="tint"]:hover { background: rgba(82, 113, 255, 0.09) !important; border-color: rgba(82, 113, 255, 0.2) !important; }
[data-hover="fill"]:hover { background: #f4f4ff !important; }
.home-price-card:not(.is-featured):hover { border-color: rgba(82, 113, 255, 0.4) !important; box-shadow: 0 8px 30px rgba(82, 113, 255, 0.12) !important; transform: translateY(-3px); }
.home-price-cta:hover { opacity: 0.9; transform: scale(0.98); }
