.ngo-preloader-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #ffffff 40%, #f4f9f6 100%);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1), visibility 0.8s ease;
}

.ngo-preloader-bg.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#ngo-preloader {
    background: #fff;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

.preloader-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ngo-preloader-bg .notebook-img {
    position: absolute;
    left: 0px;
}

.orbit-stage {
    position: relative;
    width: 320px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.ring-1 {
    width: 280px;
    height: 280px;
    border: 2px dashed rgba(0, 194, 94, 0.3);
    animation: rotateClockwise 8s linear infinite;
}

.ring-2 {
    width: 310px;
    height: 310px;
    border: 1.5px solid rgba(11, 67, 113, 0.15);
    animation: rotateCounterClockwise 11s linear infinite;
}

.orbit-dot {
    position: absolute;
    border-radius: 50%;
}

.dot-green {
    width: 16px;
    height: 16px;
    background: #00c25e;
    box-shadow: 0 0 14px #00c25e, 0 0 30px rgba(0, 194, 94, 0.6);
    top: 14px;
    left: 45px;
    display: none !important;
}

.dot-blue {
    width: 14px;
    height: 14px;
    background: #0b4371;
    box-shadow: 0 0 14px #0b4371, 0 0 25px rgba(11, 67, 113, 0.5);
    bottom: 25px;
    right: 40px;
    display: none !important;
}

.logo-core {
    position: relative;
    z-index: 2;
    animation: breatheLogo 3s ease-in-out infinite alternate;
}

.ngo-logo {
    max-width: 260px;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 25px rgba(0, 80, 40, 0.12));
}

.counter-display {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #0b4371;
    letter-spacing: -0.5px;
}

.percent-symbol {
    font-size: 1.3rem;
    color: #00c25e;
    margin-left: 2px;
}

.ngo-progress-bar-wrapper {
    width: 220px;
    height: 6px;
    background: #e6edf2;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 6px;
}

.ngo-progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0b4371, #00c25e);
    border-radius: 20px;
    transition: width 0.15s ease-out;
}

.tagline-wrapper {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter-headline {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2b394a;
    letter-spacing: 0.5px;
}

.cursor-blink {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00c25e;
    margin-left: 3px;
    animation: blinkCursor 0.7s infinite;
}

@keyframes rotateClockwise {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateCounterClockwise {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

@keyframes breatheLogo {
    0% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1.03);
    }
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 991.98px) {
    .orbit-stage {
        width: 280px;
        height: 220px;
    }

    .ring-1 {
        width: 250px;
        height: 250px;
    }

    .ring-2 {
        width: 275px;
        height: 275px;
    }

    .ngo-logo {
        max-width: 220px;
    }

    .counter-display {
        font-size: 2rem;
    }

    .typewriter-headline {
        font-size: 1.1rem;
    }
}

/* ===== Mobile (<= 767px) ===== */
@media (max-width: 767.98px) {
    .ngo-preloader-bg {
        height: 100% !important;
        display: block;
        padding-top: 128px;
    }

    .preloader-container {
        padding: 0 16px;
        width: 100%;
        text-align: center;
    }

    .ngo-preloader-bg .notebook-img {
        display: none !important;
    }

    .orbit-stage {
        width: 240px;
        height: 190px;
    }

    .ring-1 {
        width: 210px;
        height: 210px;
        border-width: 1.5px;
    }

    .ring-2 {
        width: 232px;
        height: 232px;
        border-width: 1px;
    }

    .ngo-logo {
        max-width: 180px;
        filter: drop-shadow(0 8px 18px rgba(0, 80, 40, 0.12));
    }

    .counter-display {
        font-size: 1.7rem;
    }

    .percent-symbol {
        font-size: 1.1rem;
    }

    .ngo-progress-bar-wrapper {
        width: 70%;
        max-width: 220px;
        height: 5px;
    }

    .tagline-wrapper {
        min-height: 44px;
        padding: 0 10px;
    }

    .typewriter-headline {
        font-size: 1rem;
        letter-spacing: 0.3px;
        line-height: 1.35;
        text-align: center;
    }

    .cursor-blink {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .orbit-stage {
        width: 210px;
        height: 170px;
    }

    .ring-1 {
        width: 185px;
        height: 185px;
    }

    .ring-2 {
        width: 205px;
        height: 205px;
    }

    .ngo-logo {
        max-width: 155px;
    }

    .counter-display {
        font-size: 1.5rem;
    }

    .typewriter-headline {
        font-size: 0.92rem;
    }
}

@media (max-width: 360px) {
    .orbit-stage {
        width: 190px;
        height: 155px;
    }

    .ring-1 {
        width: 170px;
        height: 170px;
    }

    .ring-2 {
        width: 188px;
        height: 188px;
    }

    .ngo-logo {
        max-width: 135px;
    }

    .typewriter-headline {
        font-size: 0.85rem;
    }
}

@media (max-height: 480px) and (orientation: landscape) {
    .orbit-stage {
        width: 190px;
        height: 130px;
    }

    .ring-1 {
        width: 150px;
        height: 150px;
    }

    .ring-2 {
        width: 170px;
        height: 170px;
    }

    .ngo-logo {
        max-width: 120px;
    }

    .counter-display {
        font-size: 1.3rem;
    }

    .tagline-wrapper {
        min-height: 24px;
    }

    .typewriter-headline {
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ring-1,
    .ring-2,
    .logo-core {
        animation: none;
    }
}

.torn-edge {
    width: 100%;
    height: 60px;
    margin-top: -59px;
    position: relative;
    z-index: 5;
    line-height: 0;
    filter: drop-shadow(0 -6px 4px rgba(0, 0, 0, .25));
}

.torn-edge svg {
    width: 100%;
    height: calc(100% + 2px);
    /* extra 2px neeche, gap band */
    display: block;
    margin-bottom: -2px;
}

/* torn edge ke BAAD wala white section */
.next-section {
    background: #fff;
    position: relative;
    z-index: 6;
    /* torn-edge (5) se upar */
    margin-top: -1px;
    /* 1px overlap, line hat jayegi */
}

@media(max-width:768px) {
    .torn-edge {
        height: 36px;
        margin-top: -35px;
    }
}

@media(max-width:768px) {
    .torn-edge {
        height: 36px;
        margin-top: -35px;
        /* sirf left/right clip, upar-neeche shadow aur gap cover rahe */
        clip-path: inset(-10px 0 -3px 0);
    }

    .torn-edge svg {
        width: 260%;
        /* jitna bada, utne daant bade aur door */
        margin-left: -80%;
        /* (260-100)/2 = beech ka hissa dikhega */
        max-width: none;
    }
}
