/* ==========================================================================
   SECTION 2 · DEMAND SENSING — Credibility & Brand Collaboration  (v3)
   - Reduced width (max 960px)
   - Strict 16:9 aspect ratio on desktop & tablet
   - 2 logos removed (4 total, 8 with duplicate marquee set)
   - Fully mobile responsive: 16:9 frame relaxes on small screens
     so ALL content stays visible — no clipping
   ========================================================================== */

/* ---------- Scoped tokens ---------- */
.ds-credibility {
    --ds-deep:        #050b1a;
    --ds-base:        #0b1a36;
    --ds-mid:         #122a52;
    --ds-hi:          #1d3a6e;
    --ds-rim:         #2a4a83;
    --ds-edge:        rgba(255,255,255,0.10);
    --ds-edge-soft:   rgba(255,255,255,0.05);
    --ds-shadow:      rgba(2,6,14,0.65);
    --ds-ink:         #f4f7ff;
    --ds-ink-2:       #c9d4ee;
    --ds-ink-3:       #93a5c8;
    --ds-ink-4:       #6a7ea4;
    --ds-line:        rgba(255,255,255,0.08);
    --ds-line-strong: rgba(255,255,255,0.16);
    --ds-accent:      #6ea8ff;
    --ds-accent-2:    #b9d0ff;

    --ds-metallic:
        radial-gradient(1200px 600px at 80% -10%, rgba(110,168,255,0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(40,80,160,0.18), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 35%),
        linear-gradient(135deg, #0a1730 0%, #14274d 40%, #0d1c3a 70%, #050d22 100%);

    /* SMALLER, NARROWER SECTION */
    max-width: 960px;
    width: calc(100% - 48px);
    margin: 56px auto;
    color: var(--ds-ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

/* ---------- 16:9 Aspect Ratio Frame ---------- */
.ds-aspect {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: var(--ds-metallic);
    border: 1px solid var(--ds-line-strong);
    box-shadow:
        inset 0 1px 0 var(--ds-edge),
        inset 0 -1px 0 rgba(0,0,0,0.5),
        0 30px 80px -30px var(--ds-shadow),
        0 10px 30px -10px rgba(2,6,14,0.45);
    overflow: hidden;
    isolation: isolate;
}

/* Brushed-metal noise */
.ds-aspect::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(
            135deg,
            rgba(255,255,255,0.012) 0px,
            rgba(255,255,255,0.012) 1px,
            transparent 1px,
            transparent 3px
        );
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: overlay;
    opacity: 0.7;
}

/* Top rim highlight */
.ds-aspect::after {
    content: "";
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    z-index: 1;
    pointer-events: none;
}

/* Decorative glints */
.ds-bg-glint {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
    opacity: 0.5;
}
.ds-bg-glint--a {
    top: -120px; right: -80px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(110,168,255,0.35), transparent 65%);
}
.ds-bg-glint--b {
    bottom: -140px; left: -60px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(38,78,160,0.45), transparent 65%);
}

/* Dot grid */
.ds-bg-grid {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* ---------- Container (fills 16:9 frame) ---------- */
.ds-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    padding: 3.2% 4%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* ---------- Heading ---------- */
.ds-heading {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    flex: 0 0 auto;
}

.ds-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 50%),
        linear-gradient(135deg, #122a52 0%, #1d3a6e 50%, #0d1f3e 100%);
    border: 1px solid var(--ds-line-strong);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -1px 0 rgba(0,0,0,0.4),
        0 4px 14px rgba(2,6,14,0.5);
    color: var(--ds-ink-2);
    font-size: clamp(0.6rem, 0.95vw, 0.72rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ds-eyebrow-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #d4dff3 0%, #8aa3cc 45%, #3e588a 100%);
    box-shadow: 0 0 8px rgba(110,168,255,0.6);
}

.ds-title {
    font-size: clamp(1.1rem, 2.6vw, 1.95rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--ds-ink);
    text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}

.ds-accent {
    background: linear-gradient(135deg, #b9d0ff 0%, #6ea8ff 55%, #4a86e8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-style: italic;
}

.ds-tagline {
    margin: 0 auto;
    max-width: 640px;
    font-size: clamp(0.72rem, 1.05vw, 0.88rem);
    line-height: 1.5;
    color: var(--ds-ink-2);
    font-weight: 400;
}
.ds-tagline strong { color: var(--ds-ink); font-weight: 700; }
.ds-tagline em { color: var(--ds-accent-2); font-style: italic; }

/* ---------- Stats grid ---------- */
.ds-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    flex: 0 0 auto;
}

.ds-stat-card {
    position: relative;
    padding: clamp(8px, 1.4vw, 14px) clamp(8px, 1.2vw, 14px);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 50%),
        linear-gradient(135deg, #16294d 0%, #1d3868 50%, #0e1f3e 100%);
    border: 1px solid var(--ds-line-strong);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -1px 0 rgba(0,0,0,0.45),
        0 10px 28px -14px rgba(2,6,14,0.7);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
    min-width: 0;
}
.ds-stat-card::before {
    content: "";
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}
.ds-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--ds-rim);
}

.ds-stat-icon {
    width: clamp(24px, 2.8vw, 32px);
    height: clamp(24px, 2.8vw, 32px);
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 50%),
        linear-gradient(135deg, #1a2c4e 0%, #25406b 100%);
    border: 1px solid var(--ds-line-strong);
    color: var(--ds-accent-2);
    margin-bottom: 6px;
}
.ds-stat-icon svg { width: 60%; height: 60%; }

.ds-stat-value {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: clamp(1.1rem, 2.2vw, 1.7rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, #ffffff 0%, #c9d4ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}
.ds-currency { font-size: 0.7em; opacity: 0.9; }
.ds-suffix   { font-size: 0.55em; font-weight: 800; margin-left: 2px; }

.ds-stat-label {
    color: var(--ds-ink);
    font-size: clamp(0.66rem, 0.92vw, 0.82rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
    line-height: 1.2;
}
.ds-stat-sub {
    color: var(--ds-ink-3);
    font-size: clamp(0.58rem, 0.78vw, 0.7rem);
    line-height: 1.35;
    font-weight: 500;
}

/* ---------- Brand strip ---------- */
.ds-brands-block { flex: 0 0 auto; }

.ds-brands-pre {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--ds-ink-3);
    font-size: clamp(0.58rem, 0.78vw, 0.7rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 8px;
}
.ds-brands-line {
    height: 1px;
    flex: 0 0 40px;
    background: linear-gradient(90deg, transparent, var(--ds-line-strong), transparent);
}

.ds-brands-marquee {
    position: relative;
    overflow: hidden;
    padding: clamp(8px, 1.2vw, 14px) 0;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 50%),
        linear-gradient(135deg, #0c1c3a 0%, #122a52 50%, #081530 100%);
    border: 1px solid var(--ds-line);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(0,0,0,0.4);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.ds-brands-track {
    display: flex;
    gap: 48px;
    align-items: center;
    width: max-content;
    animation: dsBrandsMarquee 26s linear infinite;
}
.ds-brand {
    flex-shrink: 0;
    padding: 2px 6px;
    opacity: 0.75;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.ds-brand svg { display: block; height: clamp(18px, 2.4vw, 24px); width: auto; }
.ds-brand:hover { opacity: 1; transform: translateY(-2px) scale(1.04); }

@keyframes dsBrandsMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- Trust pills ---------- */
.ds-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    flex: 0 0 auto;
}
.ds-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: clamp(4px, 0.7vw, 7px) clamp(8px, 1.2vw, 14px);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 50%),
        linear-gradient(135deg, #112750 0%, #1a3464 100%);
    border: 1px solid var(--ds-line-strong);
    color: var(--ds-ink-2);
    font-size: clamp(0.6rem, 0.82vw, 0.74rem);
    font-weight: 600;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        inset 0 -1px 0 rgba(0,0,0,0.3),
        0 4px 12px rgba(2,6,14,0.45);
    white-space: nowrap;
}
.ds-trust-pill svg { width: 11px; height: 11px; color: var(--ds-accent-2); flex-shrink: 0; }

/* ---------- Reveal animation (v5: safe default — always visible) ----------
   Previously: opacity:0 by default, made visible only when JS adds .is-visible.
   That caused sections to remain invisible if JS was slow or the IntersectionObserver
   never fired for that element. Now: content is visible by default; the .is-visible
   class is still supported for any future progressive-enhancement, but we no longer
   hide content while waiting for it.
*/
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE — KEEP 16:9 on desktop & tablet,
   release aspect ratio on mobile so all content stays visible
   ========================================================================== */

/* Large tablet / small desktop */
@media (max-width: 1024px) {
    .ds-credibility {
        max-width: 880px;
        width: calc(100% - 40px);
        margin: 44px auto;
    }
    .ds-container { padding: 3% 3.5%; }
}

/* Tablet — keep 16:9 but tighter */
@media (max-width: 820px) {
    .ds-credibility {
        max-width: 100%;
        width: calc(100% - 32px);
        margin: 32px auto;
    }
    .ds-aspect { border-radius: 22px; }
    .ds-container { padding: 2.8% 3%; }
    .ds-stats { gap: 8px; }
    .ds-brands-track { gap: 36px; }
}

/* Mobile — release 16:9, switch to natural flow so ALL content fits */
@media (max-width: 640px) {
    .ds-credibility {
        width: calc(100% - 24px);
        margin: 22px auto;
    }
    .ds-aspect {
        aspect-ratio: auto;
        border-radius: 18px;
        min-height: 0;
    }
    .ds-container {
        position: relative;
        inset: auto;
        padding: 28px 18px;
        gap: 20px;
    }

    .ds-heading { max-width: 100%; }
    .ds-eyebrow {
        font-size: 0.62rem;
        padding: 5px 10px;
        margin-bottom: 12px;
        letter-spacing: 0.06em;
    }
    .ds-title {
        font-size: clamp(1.2rem, 5.4vw, 1.5rem);
        line-height: 1.18;
        margin-bottom: 10px;
    }
    .ds-br { display: none; }
    .ds-tagline {
        font-size: 0.78rem;
        line-height: 1.55;
        padding: 0 4px;
    }

    .ds-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .ds-stat-card { padding: 12px 10px; border-radius: 12px; }
    .ds-stat-icon { width: 26px; height: 26px; margin-bottom: 8px; }
    .ds-stat-value { font-size: 1.25rem; }
    .ds-stat-label { font-size: 0.72rem; }
    .ds-stat-sub { font-size: 0.62rem; }

    .ds-brands-pre {
        font-size: 0.58rem;
        letter-spacing: 0.12em;
        gap: 8px;
    }
    .ds-brands-line { flex: 0 0 18px; }
    .ds-brands-marquee {
        padding: 10px 0;
        border-radius: 10px;
        mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    }
    .ds-brands-track { gap: 28px; animation-duration: 22s; }
    .ds-brand svg { height: 16px; }

    .ds-trust-row { gap: 6px; }
    .ds-trust-pill {
        font-size: 0.62rem;
        padding: 5px 9px;
        gap: 5px;
    }
    .ds-trust-pill svg { width: 10px; height: 10px; }
}

/* Small mobile */
@media (max-width: 420px) {
    .ds-credibility {
        width: calc(100% - 16px);
        margin: 18px auto;
    }
    .ds-aspect { border-radius: 16px; }
    .ds-container { padding: 22px 14px; gap: 16px; }
    .ds-stats { gap: 6px; }
    .ds-stat-card { padding: 10px 8px; }
    .ds-stat-value { font-size: 1.15rem; }
    .ds-stat-label { font-size: 0.68rem; }
    .ds-stat-sub { font-size: 0.58rem; }
    .ds-title { font-size: 1.15rem; }
    .ds-tagline { font-size: 0.72rem; }
    .ds-trust-pill { font-size: 0.58rem; padding: 4px 8px; }
}

/* Ultra-narrow */
@media (max-width: 340px) {
    .ds-stats { grid-template-columns: 1fr; }
    .ds-trust-row { flex-direction: column; align-items: stretch; }
    .ds-trust-pill { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .ds-brands-track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; }
    .ds-brands-marquee { mask-image: none; -webkit-mask-image: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
}
