/* ============ SECTION & WRAPPER ============ */
.our-story-section,
.our-story-section * {
    box-sizing: border-box;
}
.our-story-section {
    background: #ffffff;
    padding: 80px 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
}
.our-story-section .our-story-wrapper {
    display: flex;
    /* Desktop: keep content + image on one line — they shrink to fit
       instead of wrapping. The <=1024px rule switches to a stacked
       column layout, so wrapping isn't needed here. */
    flex-wrap: nowrap;
    gap: 60px;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* ============ LEFT SIDE ============ */
.our-story-section .our-story-left {
    /* Higher shrink factor → content yields width first so the image
       stays close to its size when space is tight (still one line). */
    flex: 1 2.5 460px;
    min-width: 0;
    max-width: 100%;
}
.our-story-section .our-story-heading {
    margin-bottom: 40px;
}
.our-story-section .our-story-heading h2 {
    font-family: 'Syne', sans-serif !important;
    font-weight: 700 !important;
    font-size: 40px !important;
    line-height: 1.1 !important;
    color: #191919 !important;
    margin: 0 0 15px 0 !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.our-story-section .our-story-intro {
    font-family: 'Google Sans', sans-serif !important;
    font-weight: 400 !important;
    font-size: 22px !important;
    line-height: 1.4 !important;
    color: #778AA9 !important;
    margin: 0 !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* ---- Story boxes ---- */
.our-story-section .xlstory-boxes {
    width: 100%;
    max-width: 100%;
}
.our-story-section .xlstory-box {
    width: 100%;
    max-width: 100%;
    margin-bottom: 32px;
}
.our-story-section .xlstory-box:last-child {
    margin-bottom: 0;
}

/* ---- Box title row: icon + label ---- */
.our-story-section .xlstory-box-title {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: -6px;
    margin-bottom: 14px;
    max-width: 100%;
}
.our-story-section .xlstory-box-title img {
    display: block !important;
    width: 45px !important;
    height: 45px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}
.our-story-section .xlstory-box-title span {
    display: block !important;
    font-family: "Google Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 20px !important;
    line-height: 1.2 !important;
    color: var(--xlstory-box-title, #35B6FF) !important;
    white-space: normal;
}

/* ---- Box paragraphs ---- */
.our-story-section .xlstory-box p {
    font-family: "Google Sans", sans-serif !important;
    font-weight: 400 !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
    color: var(--xlstory-box-text, #778AA9) !important;
    margin: 0 0 12px 0 !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.our-story-section .xlstory-box p:last-child {
    margin-bottom: 0 !important;
}

/* ============ RIGHT SIDE ============ */
.our-story-section .our-story-right {
    flex: 1 1 600px;
    max-width: 722px;
    min-width: 0;
    width: 100%;
    position: relative;
    aspect-ratio: 722 / 491;
    height: auto;
}

/* Dots */
.our-story-section .our-story-right .xlstory-dots {
    position: absolute;
    width: 13.74%;
    height: auto;
    aspect-ratio: 99.21 / 121.39;
    pointer-events: none;
    z-index: 1;
    filter: brightness(0) saturate(100%) invert(94%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(91%) contrast(86%);
}
.our-story-section .our-story-right .xlstory-dots-1 {
    top: 9.78%;
    left: 23%;
    transform: rotate(-90deg);
}
.our-story-section .our-story-right .xlstory-dots-2 {
    top: 27.29%;
    left: 86.29%;
}

/* Image panels */
.our-story-section .our-story-right .xlstory-img-wrap {
    position: absolute;
    width: 57.2%;
    height: auto;
    aspect-ratio: 413 / 319;
    border-radius: 35px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
    background: #f5f5f5;
}
.our-story-section .our-story-right .xlstory-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}
.our-story-section .our-story-right .xlstory-img-front {
    top: 20.57%;
    left: 0;
    z-index: 3;
}
.our-story-section .our-story-right .xlstory-img-back {
    top: 0;
    left: 38.22%;
    z-index: 2;
}

/* Quote card */
.our-story-section .our-story-right .xlstory-quote-box {
    position: absolute;
    top: 71.69%;
    left: 29.92%;
    width: 57.2%;
    height: auto;
    aspect-ratio: 413 / 139;
    z-index: 4;
    background: linear-gradient(96.94deg, var(--xlstory-q-from, #006BA8) 2.27%, var(--xlstory-q-to, #35B6FF) 96.11%);
    border-radius: 30px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    padding: 24px 32px;
    box-shadow: 0 12px 30px rgba(0,107,168,0.25);
}
.our-story-section .our-story-right .xlstory-quote-icon {
    font-family: "Syne", sans-serif !important;
    font-weight: 600 !important;
    font-size: clamp(48px, 6.5vw, 90px) !important;
    line-height: 10px !important;
    color: var(--xlstory-q-text, #ffffff) !important;
    margin-top: 20px;
    display: block !important;
}
.our-story-section .our-story-right .xlstory-quote-text {
    color: var(--xlstory-q-text, #ffffff) !important;
    text-align: left !important;
    margin: 0 !important;
    font-family: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(15px, 1.8vw, 24px) !important;
    line-height: 1.15 !important;
}

/* ============ LAPTOP / TABLET ============ */
/* Extra left/right breathing room on screens up to 1300px (matches footer) */
@media (max-width: 1300px) {
    .our-story-section .our-story-wrapper {
        width: auto;
        margin-left: 70px;
        margin-right: 70px;
    }
}

@media (max-width: 1180px) {
    .our-story-section { padding: 70px 32px; }
    .our-story-section .our-story-wrapper { gap: 48px; }
    .our-story-section .our-story-right .xlstory-quote-box { padding: 16px 24px; border-radius: 24px; }
    .our-story-section .our-story-right .xlstory-img-wrap { border-radius: 28px; }
}

/* ============ COLUMN SWAP @ 1240px ============
   The 460 + 600 + 60gap columns get too cramped below ~1240px (the text
   column shrinks to an unreadable width beside the image), so stack them —
   image on top, copy below — across the whole laptop/tablet band.          */
@media (max-width: 1240px) {
    .our-story-section { padding: 60px 30px; }
    .our-story-section .our-story-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 40px;
        /* Back to centered/full-width; section padding handles side space here. */
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .our-story-section .our-story-right {
        order: 1;
        flex: 1 1 100%;
        max-width: 100%;
    }
    .our-story-section .our-story-left {
        order: 2;
        flex: 1 1 100%;
        width: 100%;
    }
    .our-story-section .our-story-right .xlstory-quote-box { padding: 16px 22px; border-radius: 22px; }
    .our-story-section .our-story-right .xlstory-img-wrap { border-radius: 24px; }
}

@media (max-width: 900px) {
    .our-story-section .our-story-wrapper { gap: 32px; }
    .our-story-section .our-story-right .xlstory-quote-box { padding: 14px 20px; border-radius: 20px; }
    .our-story-section .our-story-right .xlstory-img-wrap { border-radius: 20px; }
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
    .our-story-section { padding: 40px 20px; }
    .our-story-section .our-story-wrapper { gap: 50px; }
    .our-story-section .our-story-right .xlstory-img-wrap { border-radius: 5vw; }
    .our-story-section .our-story-right .xlstory-quote-box { padding: 4% 5%; border-radius: 4vw; top:65%; left:35%; }
    .our-story-section .our-story-right .xlstory-quote-icon { font-size: 12vw !important; }
    .our-story-section .our-story-right .xlstory-quote-text { font-size: 3vw !important; }
    .our-story-section .xlstory-box-title span { font-size: 18px !important; }
    .our-story-section .xlstory-box-title img { width: 40px !important; height: 40px !important; }
}
@media (max-width: 480px) {
    .our-story-section { padding: 32px 16px; }
    .our-story-section .our-story-right .xlstory-quote-icon { font-size: 13vw !important; }
    .our-story-section .our-story-right .xlstory-quote-text { font-size: 3.3vw !important; }
    .our-story-section .xlstory-box p { font-size: 15px !important; }
}

/* ==========================================================================
   Scroll Reveal — "Composition Assembly"  (About-Us hero)
   A premium, choreographed entrance: the left copy glides in from the left
   while the right-side artwork ASSEMBLES piece by piece — the two photo panels
   slide into place, the dotted accents spin + fade in, and the quote card pops
   up last with a soft overshoot. JS adds .xlstory-reveal (arms the hidden
   state) and then .xlstory-in once the section scrolls into view.

   All motion is opacity + transform only. Each element's REVEALED transform is
   set back to its natural resting value (e.g. dots-1 keeps its -90deg tilt) so
   the animation never clobbers the layout's own transforms.
   ========================================================================== */

/* ---- Left column: copy slides in from the left, staggered ---- */
.our-story-section.xlstory-reveal .our-story-heading,
.our-story-section.xlstory-reveal .xlstory-box {
    opacity: 0;
    transform: translateX(-42px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.05s cubic-bezier(0.16, 1, 0.3, 1);
}
.our-story-section.xlstory-reveal.xlstory-in .our-story-heading,
.our-story-section.xlstory-reveal.xlstory-in .xlstory-box {
    opacity: 1;
    transform: none;
}
.our-story-section.xlstory-reveal .our-story-heading      { transition-delay: 0.05s; }
.our-story-section.xlstory-reveal .xlstory-box:nth-child(1) { transition-delay: 0.22s; }
.our-story-section.xlstory-reveal .xlstory-box:nth-child(2) { transition-delay: 0.34s; }
.our-story-section.xlstory-reveal .xlstory-box:nth-child(3) { transition-delay: 0.46s; }
.our-story-section.xlstory-reveal .xlstory-box:nth-child(4) { transition-delay: 0.58s; }

/* ---- Right column: artwork assembles piece by piece ---- */
/* Shared base (each piece adds its own start transform + delay below). */
.our-story-section.xlstory-reveal .xlstory-img-back,
.our-story-section.xlstory-reveal .xlstory-img-front,
.our-story-section.xlstory-reveal .xlstory-dots {
    opacity: 0;
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Photo panels glide in from opposite corners and settle flat. */
.our-story-section.xlstory-reveal .xlstory-img-back {
    transform: translate(-30px, -26px) scale(0.92);
    transition-delay: 0.15s;
}
.our-story-section.xlstory-reveal .xlstory-img-front {
    transform: translate(-26px, 30px) scale(0.92);
    transition-delay: 0.3s;
}
.our-story-section.xlstory-reveal.xlstory-in .xlstory-img-back,
.our-story-section.xlstory-reveal.xlstory-in .xlstory-img-front {
    opacity: 1;
    transform: none;
}

/* Dotted accents spin + scale into place (dots-1 keeps its -90deg rest tilt). */
.our-story-section.xlstory-reveal .xlstory-dots-1 {
    transform: rotate(-190deg) scale(0.4);
    transition-delay: 0.5s;
}
.our-story-section.xlstory-reveal.xlstory-in .xlstory-dots-1 {
    opacity: 1;
    transform: rotate(-90deg) scale(1);
}
.our-story-section.xlstory-reveal .xlstory-dots-2 {
    transform: rotate(-100deg) scale(0.4);
    transition-delay: 0.58s;
}
.our-story-section.xlstory-reveal.xlstory-in .xlstory-dots-2 {
    opacity: 1;
    transform: none;
}

/* Quote card pops up last with a gentle overshoot. */
.our-story-section.xlstory-reveal .xlstory-quote-box {
    opacity: 0;
    transform: translateY(34px) scale(0.9);
    transition:
        opacity 0.7s ease,
        transform 0.85s cubic-bezier(0.34, 1.3, 0.5, 1);
    transition-delay: 0.68s;
}
.our-story-section.xlstory-reveal.xlstory-in .xlstory-quote-box {
    opacity: 1;
    transform: none;
}

/* Respect reduced-motion — show everything immediately, no movement. */
@media (prefers-reduced-motion: reduce) {
    .our-story-section.xlstory-reveal .our-story-heading,
    .our-story-section.xlstory-reveal .xlstory-box,
    .our-story-section.xlstory-reveal .xlstory-img-back,
    .our-story-section.xlstory-reveal .xlstory-img-front,
    .our-story-section.xlstory-reveal .xlstory-dots-2,
    .our-story-section.xlstory-reveal .xlstory-quote-box {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .our-story-section.xlstory-reveal .xlstory-dots-1 {
        opacity: 1 !important;
        transform: rotate(-90deg) !important;
        transition: none !important;
    }
}
