/* ── inventory-forecast-custom.css ── */

/* Font Fallback */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    size-adjust: 107.64%;
    ascent-override: 90%;
    descent-override: 22.43%;
    line-gap-override: 0%;
}
body, .font-inter {
    font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
}

/* ── Hero (Dark Gradient — matches Inventory Management) ── */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #04143d 0%, #0a2a5e 50%, #04143d 100%);
}
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}
.hero-blob-1 { width: 600px; height: 600px; background: rgba(4, 107, 252, 0.4); top: -200px; left: -150px; }
.hero-blob-2 { width: 500px; height: 500px; background: rgba(255, 153, 0, 0.3); top: 50px; right: -100px; }
.hero-content { position: relative; z-index: 10; }

@media (max-width: 768px) {
    .hero-blob { opacity: 0.3; filter: blur(140px); }
    .hero-blob-1 { width: 350px; height: 350px; }
    .hero-blob-2 { width: 280px; height: 280px; }
}

/* ── Hero CTA Pulse ── */
@keyframes heroPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(255, 153, 0, 0.5); }
}
.hero-cta-pulse { animation: heroPulse 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .hero-cta-pulse { animation: none !important; }
}

/* ── Hero Rotating Text ── */
@keyframes heroTextIn {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroTextOut {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-18px); }
}
.hero-rotate {
    display: inline-block;
    animation: heroTextIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-rotate.out {
    animation: heroTextOut 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}
@media (prefers-reduced-motion: reduce) {
    .hero-rotate, .hero-rotate.out {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Submenu ── */
.submenu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(4, 20, 61, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(calc(-100% - 80px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.submenu.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.submenu-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    padding: 14px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
    text-decoration: none;
}
.submenu-link:hover,
.submenu-link.active {
    color: #fff;
}
.submenu-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #046bfc;
    border-radius: 2px;
}
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #046bfc;
    width: 0;
    transition: width 0.15s linear;
}
@media (max-width: 640px) {
    .submenu-link { padding: 0.625rem 0.625rem; font-size: 0.75rem; }
}

/* ── Button Pill ── */
.btn-pill {
    border-radius: 50px;
    min-height: 44px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn-pill:hover { filter: brightness(1.06); }
.btn-pill:active { transform: scale(0.97); }
.btn-pill:focus-visible { outline: 2px solid #046bfc; outline-offset: 3px; border-radius: 50px; }

/* ── Dark Macrobox ── */
.macrobox-dark {
    background: #04143d;
    position: relative;
    overflow: hidden;
}
.macrobox-dark::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(4, 107, 252, 0.4) 0%, transparent 60%);
    pointer-events: none;
}
.macrobox-dark::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.25) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Section Decorations ── */
.section-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(4, 107, 252, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}
.section-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}
.section-blob-blue { background: rgba(4, 107, 252, 0.12); }
.section-blob-orange { background: rgba(255, 153, 0, 0.1); }
.section-blob-green { background: rgba(16, 185, 129, 0.1); }

/* ── Scroll Reveal ── */
@keyframes revealIn {
    0% { opacity: 0; transform: translateY(24px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes revealLeft {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes revealRight {
    0% { opacity: 0; transform: translateX(30px); }
    100% { opacity: 1; transform: translateX(0); }
}
.reveal { opacity: 0; transform: translateY(24px); }
.reveal-left { opacity: 0; transform: translateX(-30px); }
.reveal-right { opacity: 0; transform: translateX(30px); }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ── FAQ Accordion ── */
.faq-item {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item.active {
    border-color: rgba(4, 107, 252, 0.3);
    box-shadow: 0 4px 12px rgba(4, 107, 252, 0.08);
}
.faq-toggle:hover,
.faq-question:hover { background: #f8fafc; }
.faq-icon {
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
    background: #046bfc !important;
    color: #fff !important;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-question:focus-visible {
    outline: 2px solid #046bfc;
    outline-offset: -2px;
    border-radius: 0.75rem;
}

/* ── Pain Cards ── */
.pain-card-red { border-left: 3px solid rgba(239, 68, 68, 0.4); }
.pain-card-amber { border-left: 3px solid rgba(245, 158, 11, 0.4); }

/* ── Comparison Table ── */
#comparison-table table th:nth-child(2),
#comparison-table table td:nth-child(2) {
    border-left: 2px solid rgba(4, 107, 252, 0.15);
    border-right: 2px solid rgba(4, 107, 252, 0.15);
}

/* ── HiW Laptop Mockup ── */
@keyframes hiwFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hiw-screen { display: none; }
.hiw-screen.active { display: block; animation: hiwFadeIn 0.35s ease-out; }

/* ── Desktop Sticky CTA ── */
.sticky-cta-desktop {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
}
.sticky-cta-desktop.visible { transform: translateY(0); }

/* ── Back to Top ── */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #046bfc 0%, #0356c9 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(4, 107, 252, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 60;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(4, 107, 252, 0.5);
}
body.sticky-active .back-to-top {
    bottom: 5.5rem;
}
@media (max-width: 767px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
    }
    body.sticky-active .back-to-top {
        bottom: 6.5rem;
    }
}

/* ── Generic Card Hover Lift ── */
section:not(.macrobox-dark) :is(.rounded-2xl, .rounded-xl).border:not(.shadow-lg):not(.faq-item) {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
section:not(.macrobox-dark) :is(.rounded-2xl, .rounded-xl).border:not(.shadow-lg):not(.faq-item):hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px -5px rgba(15, 23, 42, 0.1);
}

/* ── Pain Card Hover ── */
.pain-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pain-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -6px rgba(15, 23, 42, 0.12);
}

/* ── Typography & Layout ── */
h1, h2 { text-wrap: balance; }
#hero-heading { font-size: clamp(2rem, 5vw + 0.5rem, 3.5rem); }
a, button, input, select, textarea, [role="tab"] { touch-action: manipulation; }
.counter { font-variant-numeric: tabular-nums; }

/* ── Mobile Sticky CTA ── */
.sticky-cta-mobile {
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}
.sticky-cta-mobile.visible { transform: translateY(0); }

/* ── Macrobox Dot Pattern ── */
.macrobox-dot-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.3) 1px, transparent 0);
    background-size: 24px 24px;
}

/* ── Form Feedback (exit-intent) ── */
.form-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: #065f46;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 200;
}
.form-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.form-error-msg {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.form-error-msg.visible { display: block; }
.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile Optimizations ── */
@media (max-width: 767px) {
    .section-blob { display: none !important; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .btn-pill { transition: none !important; }
    section:not(.macrobox-dark) :is(.rounded-2xl, .rounded-xl).border { transition: none !important; }
    .pain-card { transition: none !important; }
    .faq-item { transition: none !important; }
    .hiw-screen.active { animation: none !important; }
    .inv-wheel-card { transition: none !important; }
}

/* ── Print Styles ── */
@media print {
    .sticky-cta-mobile, .sticky-cta-desktop,
    #backToTop, .submenu,
    .macrobox-dark::before, .macrobox-dark::after,
    .hero-blob, .section-blob, .section-grid { display: none !important; }
}




/* ── FAQ Category Tabs ── */
.faq-tab {
    padding: 12px 20px;
    min-height: 44px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}
.faq-tab:hover { border-color: #046bfc; color: #046bfc; }
.faq-tab.active { background: #046bfc; border-color: #046bfc; color: white; }
.faq-tab:focus-visible { outline: 2px solid #046bfc; outline-offset: 3px; }
.faq-category { display: none; }
.faq-category.active { display: block; }

/* ── Text Gradient (blue highlight for headings) ── */
.text-gradient {
    background: linear-gradient(135deg, #046bfc 0%, #3d8bfd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Inventory Wheel Carousel ── */
.inv-perspective { perspective: 800px; }
.inv-wheel-container {
    position: relative;
    overflow: visible;
    overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom;
}
.inv-wheel-card {
    position: absolute;
    width: 88%;
    left: 6%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.inv-wheel-card[data-position="center"] {
    z-index: 10;
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
    pointer-events: auto;
    cursor: zoom-in;
}
.inv-wheel-card[data-position="top"] {
    z-index: 5;
    transform: translateY(-65%) scale(0.82);
    opacity: 0.5;
    filter: blur(3px);
}
.inv-wheel-card[data-position="bottom"] {
    z-index: 5;
    transform: translateY(65%) scale(0.82);
    opacity: 0.5;
    filter: blur(3px);
}
.inv-wheel-card[data-position="hidden"] {
    z-index: 1;
    transform: translateY(0) scale(0.6);
    opacity: 0;
    filter: blur(6px);
}
.inv-dot {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none;
    padding: 0;
    cursor: pointer;
}
.inv-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}
.inv-dot.active::after {
    background: #046bfc;
    width: 14px;
    border-radius: 4px;
}
@media (max-width: 767px) {
    .inv-wheel-container { height: 280px !important; overflow: hidden !important; }
    .inv-wheel-card { width: 94% !important; left: 3% !important; }
    #invPrev, #invNext { width: 2.25rem !important; height: 2.25rem !important; }
    .inv-wheel-card[data-position="top"] { transform: translateY(-50%) scale(0.85) !important; opacity: 0.3 !important; }
    .inv-wheel-card[data-position="bottom"] { transform: translateY(50%) scale(0.85) !important; opacity: 0.3 !important; }
}

/* ── Exit-Intent Popup ── */
.exit-intent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 20, 61, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 1rem;
}
.exit-intent-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.exit-intent-card {
    background: white;
    border-radius: 1.5rem;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(4, 20, 61, 0.3);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}
.exit-intent-overlay.visible .exit-intent-card {
    transform: scale(1) translateY(0);
}
.exit-intent-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.exit-intent-close:hover { background: rgba(0, 0, 0, 0.6); }
.exit-intent-email {
    width: 100%;
    height: 44px;
    padding: 0 1rem 0 2.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.exit-intent-email::placeholder { color: #94a3b8; }
.exit-intent-email:focus {
    outline: none;
    border-color: #046bfc;
    box-shadow: 0 0 0 3px rgba(4, 107, 252, 0.15);
}
.exit-intent-email.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.form-error-msg {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.form-error-msg.visible { display: block; }
@media print { .exit-intent-overlay { display: none !important; } }

/* ── Content-Visibility for Below-Fold Sections ── */
#problem,
#features,
#how-it-works,
#mid-cta-demo,
#dashboard,
#comparison,
#dashboard-integration,
#faq,
#final-cta {
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}
