/* Landing page – Variant B dark theme (home_v2) */
/* ═══════════════════════════════════════════════ */

/* ── Typography ── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

body {
    background-color: rgb(15 23 42) !important;
    color: rgb(248 250 252) !important;
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif !important;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', system-ui, sans-serif !important;
    letter-spacing: -0.02em;
}
.font-mono, code, pre, [class*="font-mono"] {
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
}

/* ── Atmospheric grain overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40; /* below header z-50 and mobile menu */
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ── Hero section dot grid ── */
.hero-grid-bg {
    position: relative;
    overflow: hidden;
}
.hero-grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(148,163,184,0.08) 1px, transparent 0);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
}
.hero-grid-bg::after {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 100%;
    background: radial-gradient(ellipse 50% 40% at 50% 0%, rgba(250,204,21,0.06) 0%, transparent 70%),
                radial-gradient(ellipse 30% 30% at 30% 20%, rgba(59,130,246,0.04) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Gradient text for headings ── */
.text-gradient-gold {
    background: linear-gradient(135deg, #facc15 0%, #f59e0b 40%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-white {
    background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Glowing CTA button ── */
.cta-glow {
    position: relative;
    overflow: visible;
    transition: all 0.3s cubic-bezier(.16,1,.3,1);
}
.cta-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(135deg, #facc15, #f59e0b, #facc15);
    opacity: 0;
    filter: blur(16px);
    transition: opacity 0.4s ease;
    z-index: -1;
}
.cta-glow:hover::before {
    opacity: 0.5;
}
.cta-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -8px rgba(250,204,21,0.4);
}

/* ── CTA shimmer sweep ── */
@keyframes ctaShimmer {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(200%) skewX(-15deg); }
}
.cta-shimmer {
    position: relative;
    /* Use clip-path instead of overflow:hidden to contain shimmer
       without clipping the cta-glow pseudo-element outside bounds */
    isolation: isolate;
}
.cta-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: ctaShimmer 3s ease-in-out infinite;
    animation-delay: 1s;
    z-index: 1;
    pointer-events: none;
    clip-path: inset(0 round 0.75rem);
}

/* ── Gradient border cards ── */
.card-gradient-border {
    position: relative;
    background: rgb(30 41 59);
    border: 1px solid transparent;
    transition: all 0.35s cubic-bezier(.16,1,.3,1);
}
.card-gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(250,204,21,0) 0%, rgba(250,204,21,0.15) 50%, rgba(250,204,21,0) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    padding: 1px;
}
.card-gradient-border:hover::before {
    opacity: 1;
}
.card-gradient-border:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,.4), 0 0 0 1px rgba(250,204,21,0.1);
    border-color: rgba(250,204,21,0.15);
}

/* ── Live indicator pulse ── */
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    animation: livePulse 2s ease-in-out infinite;
}

/* ── Floating badge glow ── */
.badge-glow {
    position: relative;
}
.badge-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05);
    pointer-events: none;
}

/* ── Section divider gradient ── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(250,204,21,0.2) 50%, transparent 100%);
}

/* ── Logo marquee infinite scroll ── */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.logo-marquee { position: relative; }
.logo-track {
    animation: marquee 30s linear infinite;
    width: max-content;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }

/* ── Data cleaning row highlight ── */
@keyframes rowClean {
    0% { background: transparent; }
    30% { background: rgba(16, 185, 129, 0.1); }
    100% { background: transparent; }
}
.clean-visible .clean-row:nth-child(1) { animation: rowClean 0.6s 0.3s ease both; }
.clean-visible .clean-row:nth-child(2) { animation: rowClean 0.6s 0.45s ease both; }
.clean-visible .clean-row:nth-child(3) { animation: rowClean 0.6s 0.6s ease both; }
.clean-visible .clean-row:nth-child(4) { animation: rowClean 0.6s 0.75s ease both; }
.clean-visible .clean-row:nth-child(5) { animation: rowClean 0.6s 0.9s ease both; }

/* Progress bar fill */
.clean-progress-bar {
    width: 0;
    transition: width 1s cubic-bezier(.16,1,.3,1);
}
.clean-visible .clean-progress-bar {
    width: 100%;
}

/* Pill tags pop in */
@keyframes pillPop {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}
.clean-pill {
    opacity: 0;
}
.clean-visible .clean-pill:nth-child(1) { animation: pillPop 0.35s 1.1s cubic-bezier(.16,1,.3,1) both; }
.clean-visible .clean-pill:nth-child(2) { animation: pillPop 0.35s 1.2s cubic-bezier(.16,1,.3,1) both; }
.clean-visible .clean-pill:nth-child(3) { animation: pillPop 0.35s 1.3s cubic-bezier(.16,1,.3,1) both; }
.clean-visible .clean-pill:nth-child(4) { animation: pillPop 0.35s 1.4s cubic-bezier(.16,1,.3,1) both; }
.clean-visible .clean-pill:nth-child(5) { animation: pillPop 0.35s 1.5s cubic-bezier(.16,1,.3,1) both; }

/* ── How-it-works step animations ── */
@keyframes slideInRow {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeCheck {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes typeCursor {
    0%, 100% { border-color: transparent; }
    50% { border-color: #3b82f6; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.hiw-card {
    transition: transform 0.3s cubic-bezier(.16,1,.3,1), box-shadow 0.3s ease;
}
.hiw-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -12px rgba(0,0,0,.3);
}
.hiw-row { opacity: 0; }
.hiw-active .hiw-row:nth-child(1) { animation: slideInRow 0.4s 0.2s cubic-bezier(.16,1,.3,1) both; }
.hiw-active .hiw-row:nth-child(2) { animation: slideInRow 0.4s 0.35s cubic-bezier(.16,1,.3,1) both; }
.hiw-active .hiw-row:nth-child(3) { animation: slideInRow 0.4s 0.5s cubic-bezier(.16,1,.3,1) both; }
.hiw-active .hiw-row:nth-child(4) { animation: slideInRow 0.4s 0.65s cubic-bezier(.16,1,.3,1) both; }
.hiw-active .hiw-row:nth-child(5) { animation: slideInRow 0.4s 0.8s cubic-bezier(.16,1,.3,1) both; }
.hiw-check { opacity: 0; }
.hiw-active .hiw-check:nth-child(1) { animation: fadeCheck 0.3s 0.6s cubic-bezier(.16,1,.3,1) both; }
.hiw-active .hiw-check:nth-child(2) { animation: fadeCheck 0.3s 0.75s cubic-bezier(.16,1,.3,1) both; }
.hiw-active .hiw-check:nth-child(3) { animation: fadeCheck 0.3s 0.9s cubic-bezier(.16,1,.3,1) both; }
.hiw-active .hiw-check:nth-child(4) { animation: fadeCheck 0.3s 1.05s cubic-bezier(.16,1,.3,1) both; }
.hiw-shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(250,204,21,.15) 50%, transparent 100%);
    background-size: 200% 100%;
}
.hiw-active .hiw-shimmer {
    animation: shimmer 1.5s 0.3s ease both;
}
.hiw-typing {
    border-right: 2px solid transparent;
}
.hiw-active .hiw-typing {
    animation: typeCursor 0.8s step-end infinite;
}
.hiw-connector {
    position: absolute;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, #334155 0%, #facc15 100%);
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* FAQ accordion */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform 0.2s ease; }
details {
    transition: border-color 0.2s ease;
}
details[open] {
    border-color: rgba(250,204,21,0.2);
}

/* ── Scroll-reveal animations ── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(.16,1,.3,1), transform 0.7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children inside a grid */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s cubic-bezier(.16,1,.3,1), transform 0.5s cubic-bezier(.16,1,.3,1);
}
.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.56s; }

/* Card hover lift */
.card-hover {
    transition: transform 0.25s cubic-bezier(.16,1,.3,1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(0,0,0,.3), 0 4px 8px -2px rgba(0,0,0,.15);
    border-color: rgba(250,204,21,0.15);
}

/* Hero badge float-in */
@keyframes badgeIn {
    from { opacity: 0; transform: translateY(12px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.badge-animate {
    animation: badgeIn 0.6s cubic-bezier(.16,1,.3,1) both;
}
.badge-animate:nth-child(1) { animation-delay: 0.5s; }
.badge-animate:nth-child(2) { animation-delay: 0.65s; }
.badge-animate:nth-child(3) { animation-delay: 0.8s; }

/* Hero headline fade-in */
@keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-animate { animation: heroIn 0.8s cubic-bezier(.16,1,.3,1) both; }
.hero-animate-delay { animation: heroIn 0.8s cubic-bezier(.16,1,.3,1) 0.15s both; }
.hero-animate-delay2 { animation: heroIn 0.8s cubic-bezier(.16,1,.3,1) 0.3s both; }
.hero-animate-delay3 { animation: heroIn 0.8s cubic-bezier(.16,1,.3,1) 0.45s both; }

/* Counter number animation */
.counter-num {
    display: inline-block;
    min-width: 2ch;
}

/* ── Gradient accent bar ── */
.gradient-bar {
    height: 3px;
    background: linear-gradient(90deg, #facc15 0%, #f59e0b 50%, #eab308 100%);
    border-radius: 2px;
}

/* Comparison table row highlight on hover */
.cmp-row {
    transition: background-color 0.15s ease;
}
.cmp-row:hover {
    background-color: rgba(250,204,21,.08);
}

/* Review card subtle entrance */
@keyframes cardSlide {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Pulse dot */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}
.pulse-dot {
    animation: pulse 2s ease-in-out infinite;
}

/* ── Metric number glow ── */
.metric-number {
    text-shadow: 0 0 40px rgba(250,204,21,0.15);
}

/* ── Hero terminal mockup ── */
@keyframes terminalType {
    0% { width: 0; }
    100% { width: 100%; }
}
@keyframes terminalBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #facc15;
    margin-left: 2px;
    animation: terminalBlink 1s step-end infinite;
    vertical-align: text-bottom;
}
.terminal-line {
    overflow: hidden;
    white-space: nowrap;
}
.terminal-line.typing {
    animation: terminalType 1.5s steps(40) both;
}

/* ── Animated export counter in hero ── */
@keyframes countUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.export-counter {
    animation: countUp 0.4s cubic-bezier(.16,1,.3,1) both;
}

/* ── Final CTA section enhancements ── */
.cta-section-glow {
    position: relative;
    overflow: hidden;
}
.cta-section-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    background: radial-gradient(ellipse 40% 60% at 50% 100%, rgba(250,204,21,0.15), transparent 60%);
    pointer-events: none;
}

/* ── Comparison table Scrupp column glow ── */
.cmp-scrupp-col {
    background: linear-gradient(180deg, rgba(250,204,21,0.08) 0%, rgba(250,204,21,0.03) 100%);
    position: relative;
}

/* ── Feature icon container glow on card hover ── */
.card-hover:hover .feature-icon {
    box-shadow: 0 0 20px -4px currentColor;
    transition: box-shadow 0.3s ease;
}

/* ── Smooth section transitions ── */
section {
    position: relative;
}

/* ── Header blur enhancement ── */
header {
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
}

/* ── Selection color ── */
::selection {
    background: rgba(250,204,21,0.25);
    color: white;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgb(15 23 42);
}
::-webkit-scrollbar-thumb {
    background: rgb(51 65 85);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgb(71 85 105);
}

/* ═══════════════════════════════════════════════ */
/* ── PRICING PAGE DARK OVERRIDES ── */
/* ═══════════════════════════════════════════════ */

/* Tab active (shared by landing & pricing) */
.tab-active {
    background: #facc15;
    color: #0f172a;
    border-color: #facc15;
}

/* Dark header — for pages using base.html.twig header (pricing, etc.) */
header nav a,
header nav button,
header .font-semibold {
    color: #e2e8f0 !important;
}
header nav button.bg-slate-100 {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}
header nav button.bg-slate-100:hover {
    background-color: #475569 !important;
}
header a.border-slate-300 {
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
header a.border-slate-300:hover {
    background-color: #1e293b !important;
}

/* Dark footer */
footer {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}
footer h3 { color: #e2e8f0 !important; }
footer a { color: #94a3b8 !important; }
footer a:hover { color: #e2e8f0 !important; }
footer .border-slate-200 { border-color: #1e293b !important; }
footer .text-slate-500 { color: #64748b !important; }

/* noUiSlider dark theme */
.noUi-target {
    background: #334155;
}
.noUi-handle {
    background: #facc15;
    border-color: #f59e0b;
}
.noUi-tooltip {
    background: #0f172a;
    color: #fff;
    border: none;
}

/* Pricing tier card popular ring */
.pricing-tier-popular {
    border-color: #facc15;
    box-shadow: 0 0 40px -12px rgba(250,204,21,0.2);
}

/* ═══════════════════════════════════════════════ */
/* ── MOBILE RESPONSIVE FIXES ── */
/* ═══════════════════════════════════════════════ */

/* ── Small screens: tighten hero ── */
@media (max-width: 639px) {
    /* Reduce hero heading for small phones */
    .hero-grid-bg h1 {
        font-size: 2rem !important;
        line-height: 1.1 !important;
    }

    /* Reduce hero section vertical padding */
    .hero-grid-bg > div {
        padding-top: 3.5rem;
        padding-bottom: 2.5rem;
    }

    /* Metric numbers: smaller on mobile */
    .metric-number {
        font-size: 2.25rem !important;
    }

    /* Stack CTA buttons full width on mobile */
    .cta-glow, .cta-shimmer {
        width: 100%;
        text-align: center;
    }

    /* Disable CTA glow pseudo-element on touch (no hover) */
    .cta-glow::before {
        display: none;
    }

    /* HIW normalize rows: stack old→new vertically on small screens */
    .hiw-shimmer .flex-1 .flex.items-center.gap-2 {
        flex-wrap: wrap;
        gap: 4px;
    }
    /* Hide the arrow icon on small screens */
    .hiw-shimmer .flex-1 .flex.items-center.gap-2 > svg {
        display: none;
    }
    /* HIW status pills: shrink text */
    .hiw-shimmer + span,
    .hiw-row > span[class*="rounded-full"] {
        font-size: 0.625rem;
        padding-left: 0.375rem;
        padding-right: 0.375rem;
        white-space: nowrap;
    }

    /* Pain section cards: reduce padding */
    .reveal-stagger .flex.items-start.gap-4 {
        gap: 0.75rem;
    }
    .reveal-stagger .flex.items-start.gap-4 p {
        font-size: 0.875rem;
    }

    /* Integration grid: smaller cards */
    .card-hover .flex.flex-col.items-center.gap-3 {
        padding: 1rem;
    }

    /* FAQ accordion: tighter */
    details summary {
        padding: 0.875rem 1rem;
    }
    details .px-5.pb-5 {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-bottom: 1rem;
    }

    /* Trust strip: tighter spacing */
    .flex.flex-wrap.justify-center.items-center.gap-x-12 {
        gap: 1.5rem;
    }

    /* Final CTA: smaller heading */
    .cta-section-glow h2 {
        font-size: 1.75rem !important;
    }
}

/* ── Comparison table mobile scroll ── */
@media (max-width: 767px) {
    /* Before/After cleaned table: hide Email column on mobile */
    #cleanCard table th:nth-child(5),
    #cleanCard table td:nth-child(5) {
        display: none;
    }

    /* Comparison table: allow horizontal scroll */
    .cmp-row td:first-child,
    .cmp-row + tr td:first-child,
    table th:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: rgb(30 41 59);
    }
    table th:first-child {
        background: rgb(30 41 59);
    }

    /* Sample export table: add scroll shadow hint */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    .overflow-x-auto::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 40px;
        background: linear-gradient(to right, transparent, rgb(30 41 59));
        pointer-events: none;
        z-index: 2;
    }

    /* Metric vertical dividers: hide on mobile */
    .group .absolute.inset-y-0 {
        display: none;
    }
}

/* ── Medium screens: ensure How-it-works alternating layout works ── */
@media (min-width: 640px) and (max-width: 1023px) {
    /* HIW step cards: full width on tablet */
    .hiw-step {
        max-width: 36rem;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ── Touch devices: disable hover-only effects ── */
@media (hover: none) {
    .cta-glow::before {
        display: none;
    }
    .cta-glow:hover {
        transform: none;
        box-shadow: none;
    }
    .card-hover:hover {
        transform: none;
        box-shadow: none;
    }
    .hiw-card:hover {
        transform: none;
        box-shadow: none;
    }
    .card-gradient-border:hover {
        transform: none;
    }
}
