/* ══════════════════════════════════════════════════════════════════════════
   xcPROC PAGE - MOBILE CSS (≤ 900px)
   Loaded via media="screen and (max-width: 900px)" - does NOT touch desktop.
   
   Architecture: This file is the FINAL authority for mobile layout.
   Uses !important to override any cascade conflicts from inline <style>
   blocks. All mobile rules consolidated here.

   DOES NOT touch global footer or header - those are managed globally.
   ══════════════════════════════════════════════════════════════════════════ */

/* ===================== GLOBAL MOBILE RESETS ===================== */

/* Override page-padding variable - fluid side padding across devices */
.xcproc-page {
    --page-padding: clamp(1rem, 3.5vw, 1.5rem) !important;
    --container-padding: clamp(1rem, 3.5vw, 1.5rem) !important;
}

/* Fluid section spacing - tighter for mobile */
.section {
    padding: clamp(2rem, 5vw, 2.5rem) 0 !important;
}

.section-header {
    margin-bottom: 1rem !important;
}

.section-header h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    line-height: 1.2 !important;
}

.section-header p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem) !important;
    line-height: 1.6 !important;
}

/* Remove paragraph width constraints */
p {
    max-width: none !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   HERO SECTION
   - Stack vertically: text on top, image hidden
   - Kill violet mesh blobs
   ══════════════════════════════════════════════════════════════════════════ */

/* Stack hero to single column */
.xc-hero {
    padding: max(90px, 10vh) clamp(1rem, 3.5vw, 1.5rem) 2rem !important;
    min-height: auto !important;
}

.xc-hero-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
}

/* Hero headline - fluid */
.hero-headline {
    font-size: clamp(1.8rem, 7vw, 2.8rem) !important;
    line-height: 1.15 !important;
}

/* Hero subtext - fluid */
.hero-sub,
.premium-sub {
    font-size: clamp(0.88rem, 2.8vw, 1rem) !important;
    line-height: 1.65 !important;
}

/* Hero CTAs - centered single row */
.xc-hero-text > div[style] {
    justify-content: center !important;
    flex-wrap: nowrap !important;
    margin-top: 1.5rem !important;
}

.xc-hero-text .btn {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem !important;
    width: auto !important;
    white-space: nowrap !important;
}

.xc-hero-text .btn-lg {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem !important;
}

/* Hide hero visual (video/image) on mobile */
.xc-hero-visual {
    display: none !important;
}

/* Kill violet mesh blobs */
.xc-hero .mesh-blob,
.mesh-blob-1,
.mesh-blob-2,
.mesh-blob-3 {
    display: none !important;
}

/* Kill mesh-bg pseudo-elements that create purple gradient */
.xc-hero.mesh-bg::before,
.xc-hero.mesh-bg::after {
    display: none !important;
}

/* Hide sticky sub-nav on mobile */
.sticky-sub-nav {
    display: none !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   PHILOSOPHY SECTION - Properly Scaled Glass Cards
   ══════════════════════════════════════════════════════════════════════════ */

.vs-bento-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
}

.vs-bento-card {
    padding: 1.25rem !important;
    border-radius: 14px !important;
}

.vs-bento-card.problem-card {
    padding: 1.25rem !important;
}

.vs-bento-header {
    margin-bottom: 0.5rem !important;
}

.vs-bento-header h3 {
    font-size: 1.05rem !important;
}

.vs-bento-header .vs-subtitle {
    font-size: 0.8rem !important;
}

/* Compact icon */
.vs-bento-header .icon-wrap {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.9rem !important;
    min-width: 36px !important;
}

.vs-bento-list {
    gap: 0.5rem !important;
}

.vs-bento-list li {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
}

.vs-bento-list li i {
    font-size: 0.7rem !important;
    min-width: 16px !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   DATABASE SECTION - Accordion on mobile
   ══════════════════════════════════════════════════════════════════════════ */

/* Hide the desktop pill nav + display area */
.db-pill-nav {
    display: none !important;
}

.db-display {
    display: none !important;
}

/* Show the mobile accordion (injected by JS) */
.db-mobile-accordion {
    display: block !important;
}

.db-acc-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-1);
}

.db-acc-tab i.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    color: var(--text-3);
}

.db-acc-tab.active {
    border-color: rgba(59, 130, 246, 0.3);
    background: var(--glass-bg-strong, rgba(255,255,255,0.06));
}

.db-acc-tab.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.db-acc-body {
    display: block !important; /* Override xcpep.css display:none */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 0.5rem;
}

.db-acc-body.open {
    max-height: 800px;
    padding: 0.5rem 0.5rem 1rem;
}

.db-acc-body h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.db-acc-body p {
    font-size: 0.85rem;
    color: var(--text-3);
    line-height: 1.6;
    margin: 0 0 0.75rem;
}

.db-acc-body img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--glass-border-color, rgba(255,255,255,0.08));
    cursor: pointer;
}

.db-acc-icon {
    margin-right: 0.5rem;
    color: var(--accent-primary);
    opacity: 0.7;
    font-size: 0.85rem;
}


/* ══════════════════════════════════════════════════════════════════════════
   HOW IT WORKS - 3 Properly Scaled Vertical Cards
   ══════════════════════════════════════════════════════════════════════════ */

.hiw-timeline {
    flex-direction: column !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    padding-top: 0 !important;
}

/* Hide desktop connector line + glow */
.hiw-timeline::before,
.hiw-timeline::after {
    display: none !important;
}

.hiw-card {
    margin: 0 !important;
    padding: 1.25rem !important;
    border-radius: 14px !important;
    text-align: left !important;
}

.hiw-step-circle {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.8rem !important;
    line-height: 36px !important;
    margin-bottom: 0.75rem !important;
}

.hiw-card h3 {
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.35rem !important;
    text-align: left !important;
}

.hiw-card p {
    font-size: 0.85rem !important;
    line-height: 1.55 !important;
    text-align: left !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   OUR APPROACH - Stack grid + research banner
   ══════════════════════════════════════════════════════════════════════════ */

/* Force the inline 2-col grid to stack */
#our-approach div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
}

/* Research banner - stack vertically + scale down */
.research-banner {
    flex-direction: column !important;
    padding: 1.5rem 1.25rem !important;
    gap: 1.25rem !important;
    margin-top: 1.5rem !important;
}

.rb-divider {
    width: 100% !important;
    height: 1px !important;
    background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.3), transparent) !important;
}

.rb-label {
    font-size: 0.65rem !important;
    padding: 0.25rem 0.75rem !important;
}

.rb-left h3 {
    font-size: 1.2rem !important;
    line-height: 1.3 !important;
}

.rb-left p {
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
}

.rb-right p {
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
}

.rb-team-header h4 {
    font-size: 0.95rem !important;
}

.rb-team-header .icon-wrap {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.8rem !important;
    min-width: 32px !important;
}

.rb-features {
    grid-template-columns: 1fr !important;
    gap: 0.35rem !important;
}

.rbf-item {
    font-size: 0.8rem !important;
    padding: 0.3rem 0 !important;
}

/* Inner cards with inline styles */
.drt-card,
.cta-card {
    padding: 1.5rem 1.25rem !important;
    border-radius: 16px !important;
}

/* Force inner 2-col grid in cta-card to stack */
.cta-card div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   CTA BANNER
   ══════════════════════════════════════════════════════════════════════════ */

.cta-banner {
    padding: clamp(2rem, 6vw, 3rem) clamp(1rem, 3.5vw, 1.5rem) !important;
    text-align: center !important;
}

.cta-banner h2 {
    font-size: clamp(1.3rem, 5.5vw, 1.8rem) !important;
}

.cta-banner p {
    font-size: 0.88rem !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   FAQ - Tap-to-Expand Accordion (mobile-native)
   Questions visible, answers hidden until tapped.
   ══════════════════════════════════════════════════════════════════════════ */

.faq-compact-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
}

/* Card as accordion trigger */
.faq-compact-item {
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

/* Question row - always visible */
.faq-compact-item h4 {
    font-size: 0.92rem !important;
    padding: 1rem 1.2rem !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    line-height: 1.4 !important;
}

/* Chevron indicator */
.faq-compact-item h4::after {
    content: '\f078' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-size: 0.65rem !important;
    color: var(--text-3) !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
}

.faq-compact-item.faq-open h4::after {
    transform: rotate(180deg) !important;
}

/* Answer - hidden by default */
.faq-compact-item p {
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 1.2rem !important;
    margin: 0 !important;
    transition: max-height 0.35s ease, padding 0.35s ease !important;
    color: var(--text-2) !important;
}

/* When open */
.faq-compact-item.faq-open p {
    max-height: 500px !important;
    padding: 0 1.2rem 1rem !important;
}

.faq-compact-item.faq-open {
    border-color: rgba(59, 130, 246, 0.2) !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   IMAGE LIGHTBOX
   ══════════════════════════════════════════════════════════════════════════ */

.db-modal-nav {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.9rem !important;
}

.db-modal-nav.prev {
    left: 0.75rem !important;
}

.db-modal-nav.next {
    right: 0.75rem !important;
}

.db-modal-content {
    max-width: 95% !important;
}

.db-modal-info {
    padding: 1rem 1.25rem !important;
}

.db-modal-info h4 {
    font-size: 1.1rem !important;
}

.db-modal-info p {
    font-size: 0.82rem !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   SMALL PHONE OVERRIDES (≤ 480px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

    .section {
        padding: 2rem 0 !important;
    }

    .section-header h2 {
        font-size: 1.5rem !important;
    }

    .hero-headline {
        font-size: 1.9rem !important;
    }

    .hero-sub,
    .premium-sub {
        font-size: 0.85rem !important;
    }

    .vs-bento-card {
        padding: 1.5rem 1.2rem !important;
    }

    .hiw-card {
        padding: 1.25rem 1rem !important;
    }

    .research-banner {
        padding: 1.25rem 1rem !important;
        gap: 1rem !important;
    }

    .rb-left h3 {
        font-size: 1.1rem !important;
    }

    .cta-banner {
        padding: 2rem 1rem !important;
    }

    .faq-compact-item {
        padding: 1.25rem 1rem !important;
    }
}


/* ══════════════════════════════════════════════════════════════════════════
   EXTRA-SMALL PHONE (≤ 375px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 375px) {

    .section {
        padding: 1.75rem 0 !important;
    }

    .hero-headline {
        font-size: 1.65rem !important;
    }

    .section-header h2 {
        font-size: 1.35rem !important;
    }

    .rb-left h3 {
        font-size: 1.2rem !important;
    }

    .cta-banner h2 {
        font-size: 1.2rem !important;
    }
}
