/* ==========================================================================
   SITARAM POWER SOLUTIONS - APPLE MINIMALIST MOTION & IMMERSIVE STYLES
   ========================================================================== */

/* 1. SCROLL-DRIVEN STAGGERED REVEAL (COMPOSITOR ACCELERATED) */
.motion-reveal-init {
    opacity: 0;
    transform: translateY(24px) scale(0.985);
    transition: 
        opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.motion-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* 2. 3D PERSPECTIVE TILT & SPECULAR CURSOR SPOTLIGHT */
.motion-tilt-card {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    overflow: hidden;
}

/* Glass Specular Reflection Highlight that follows cursor */
.motion-tilt-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        380px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
        rgba(255, 255, 255, 0.55),
        transparent 70%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 5;
}

.motion-tilt-card:hover::before {
    opacity: 1;
}

/* Dark Bento Card Specular Flare */
.motion-tilt-card.dark::before,
.bento-review-card.dark.motion-tilt-card::before {
    background: radial-gradient(
        420px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
        rgba(74, 222, 128, 0.22),
        transparent 65%
    );
}

.bento-card-lime.motion-tilt-card::before {
    background: radial-gradient(
        380px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
        rgba(255, 255, 255, 0.65),
        transparent 65%
    );
}

/* 3. BATTERY CELL ENERGY SHIMMER PULSE */
.bento-bar.filled {
    position: relative;
    overflow: hidden;
}

.bento-bar.filled::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: batteryFlowPulse 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.bento-bar.filled:nth-child(1)::after { animation-delay: 0.0s; }
.bento-bar.filled:nth-child(2)::after { animation-delay: 0.15s; }
.bento-bar.filled:nth-child(3)::after { animation-delay: 0.30s; }
.bento-bar.filled:nth-child(4)::after { animation-delay: 0.45s; }

@keyframes batteryFlowPulse {
    0% {
        transform: translateX(-100%);
    }
    45%, 100% {
        transform: translateX(100%);
    }
}

/* Subtle Energy Glow on Battery Charge Badge */
.bento-charge-badge {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.bento-card-large:hover .bento-charge-badge {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 24px -4px rgba(12, 52, 35, 0.18);
}

/* 4. HERO AMBIENT PURE SINE WAVE CANVAS */
.bento-hero {
    position: relative;
    overflow: hidden;
}

.hero-sine-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

.bento-hero .bento-container {
    position: relative;
    z-index: 1;
}

/* 5. TACTILE BUTTON INTERACTIONS */
.btn-bento-primary,
.btn-bento-secondary,
.btn-bento-quote,
.btn-banner-wa,
.btn-banner-call {
    will-change: transform;
    user-select: none;
}

.btn-bento-primary:active,
.btn-bento-secondary:active,
.btn-bento-quote:active {
    transform: scale(0.96) !important;
}

/* Glowing Pulse on Primary WhatsApp Indicator Dot */
.bento-eyebrow-dot {
    position: relative;
}

.bento-eyebrow-dot::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #16A34A;
    opacity: 0.7;
    animation: pingRing 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pingRing {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    75%, 100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* 6. NUMBER COUNTER SPRING TOCK */
.bento-big-num {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-variant-numeric: tabular-nums;
}

/* 7. FRAMER-STYLE NATIVE VIEW TRANSITIONS API (CROSS-DOCUMENT MPA) */
@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

/* Persistent Shared Transition Elements (Morph seamlessly between pages) */
.bento-logo,
.brand-logo-img,
.logo-link {
    view-transition-name: persistent-brand-logo;
}

.floating-wa-btn {
    view-transition-name: persistent-floating-wa;
}

::view-transition-old(root) {
    animation: 0.28s cubic-bezier(0.16, 1, 0.3, 1) both framerPageExit;
}

::view-transition-new(root) {
    animation: 0.34s cubic-bezier(0.16, 1, 0.3, 1) both framerPageEnter;
}

@keyframes framerPageExit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.995);
    }
}

@keyframes framerPageEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(1.005);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 8. FRAMER-STYLE SCROLL-DRIVEN TEXT REVEAL (WORD-BY-WORD SCRUBBING) */
.framer-text-scroll-section {
    padding: clamp(60px, 7vw, 100px) 0;
    position: relative;
    border-top: 1px solid rgba(12, 52, 35, 0.06);
    border-bottom: 1px solid rgba(12, 52, 35, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(240, 245, 242, 0.4) 100%);
}

.framer-scrub-text {
    font-size: clamp(1.5rem, 3.2vw, 2.6rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.028em;
    max-width: 1180px;
    margin: 0;
}

.framer-word {
    display: inline-block;
    opacity: 0.2;
    filter: blur(1.5px);
    color: #8F9993;
    margin-right: 0.26em;
    transition: opacity 0.22s ease-out, filter 0.22s ease-out, color 0.22s ease-out, transform 0.22s ease-out;
    will-change: opacity, filter, color;
}

.framer-word.is-active {
    opacity: 1;
    filter: blur(0px);
    color: #0C3423;
}

.framer-word.is-highlight.is-active {
    color: #15803D;
}

/* 9. TOP SCROLL PROGRESS INDICATOR */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #15803D, #D1F44C);
    z-index: 10000;
    pointer-events: none;
    transition: width 0.08s ease-out;
}

/* ==========================================================================
   11. POWER CUT SIMULATOR WIDGET (OPTION 1)
   ========================================================================== */
.power-simulator-section {
    padding: clamp(50px, 6vw, 90px) 0;
    position: relative;
}

.sim-container {
    background: #0C3423;
    color: #FFFFFF;
    border-radius: var(--radius-bento);
    padding: clamp(32px, 4vw, 56px);
    box-shadow: 0 25px 60px -15px rgba(12, 52, 35, 0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sim-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 36px;
}

.sim-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(209, 244, 76, 0.15);
    color: #D1F44C;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.sim-title {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #FFFFFF;
    margin: 0;
}

.sim-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 12px 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.sim-toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #E2E8F0;
}

.sim-toggle-btn {
    position: relative;
    width: 68px;
    height: 36px;
    background: #16A34A;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    padding: 3px;
    display: flex;
    align-items: center;
}

.sim-toggle-knob {
    width: 30px;
    height: 30px;
    background: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(32px);
}

/* When Grid is Tripped (Power Outage mode) */
.sim-container.is-outage .sim-toggle-btn {
    background: #DC2626;
}

.sim-container.is-outage .sim-toggle-knob {
    transform: translateX(0px);
}

/* Simulator Visual Stage (3-Node Grid) */
.sim-stage {
    display: grid;
    grid-template-columns: 1fr auto 1.4fr;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: calc(var(--radius-bento) - 6px);
    padding: clamp(24px, 3vw, 40px);
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .sim-stage {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.sim-source-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.sim-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.sim-status-badge.live {
    background: rgba(34, 197, 94, 0.2);
    color: #4ADE80;
}

.sim-status-badge.tripped {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
}

.sim-transfer-badge {
    background: #D1F44C;
    color: #0C3423;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 20px rgba(209, 244, 76, 0.4);
    animation: pulseBadge 1.8s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* Connector Lightning Channel */
.sim-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sim-pulse-line {
    width: 60px;
    height: 3px;
    background: #D1F44C;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.sim-pulse-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #FFFFFF;
    transform: translateX(-100%);
    animation: flowPulse 1.2s infinite linear;
}

@keyframes flowPulse {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Appliances Grid */
.sim-appliances-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.sim-appliance-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.sim-appliance-item.active {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
}

.sim-appliance-status {
    font-size: 0.76rem;
    font-weight: 700;
    color: #4ADE80;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Metrics Bottom Bar */
.sim-footer-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .sim-footer-metrics {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.sim-metric-val {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: #D1F44C;
    font-variant-numeric: tabular-nums;
}

.sim-metric-label {
    font-size: 0.82rem;
    color: #94A3B8;
    margin-top: 2px;
}


/* ==========================================================================
   12. FRAMER-STYLE STICKY STACKING CARDS DECK (OPTION 2)
   ========================================================================== */
.sticky-deck-section {
    padding: clamp(70px, 8vw, 120px) 0;
    position: relative;
    background: #F7FAF8;
    border-top: 1px solid var(--bento-border);
    border-bottom: 1px solid var(--bento-border);
}

.sticky-deck-layout {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
    position: relative;
}

@media (max-width: 960px) {
    .sticky-deck-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.sticky-deck-pinned-col {
    position: sticky;
    top: 130px;
}

.sticky-deck-title {
    font-size: clamp(2.2rem, 3.8vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
    color: #0C3423;
    margin: 12px 0 20px;
}

.sticky-deck-sub {
    font-size: 1.05rem;
    color: var(--bento-text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

.sticky-deck-cards-col {
    display: flex;
    flex-direction: column;
    gap: 36px;
    position: relative;
}

.sticky-stack-card {
    position: sticky;
    top: calc(130px + (var(--card-index, 0) * 22px));
    background: #FFFFFF;
    border-radius: var(--radius-bento);
    border: 1px solid var(--bento-border);
    padding: clamp(32px, 4vw, 48px);
    box-shadow: 0 16px 40px -10px rgba(12, 52, 35, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 290px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    transform-origin: top center;
}

.sticky-stack-card.dark {
    background: #0C3423;
    color: #FFFFFF;
    border-color: #0C3423;
    box-shadow: 0 24px 50px -10px rgba(12, 52, 35, 0.28);
}

.sticky-stack-card.dark .sticky-card-sub {
    color: #94A3B8;
}

.sticky-card-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(12, 52, 35, 0.08);
    color: #0C3423;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.sticky-stack-card.dark .sticky-card-step-num {
    background: #D1F44C;
    color: #0C3423;
}

.sticky-card-title {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.sticky-card-sub {
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--bento-text-muted);
}

.sticky-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.sticky-card-tag {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: #F1F5F3;
    color: #0C3423;
}

.sticky-stack-card.dark .sticky-card-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #D1F44C;
}

/* ==========================================================================
   13. MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 960px) {
    .sticky-deck-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sticky-deck-pinned-col {
        position: static !important;
        margin-bottom: 16px;
    }
}

@media (max-width: 768px) {
    /* Power Cut Simulator Mobile Tuning */
    .power-simulator-section {
        padding: 32px 0;
    }

    .sim-container {
        padding: 22px 16px;
        border-radius: 20px;
    }

    .sim-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 22px;
    }

    .sim-title {
        font-size: 1.6rem;
        line-height: 1.18;
    }

    .sim-toggle-wrapper {
        width: 100%;
        justify-content: space-between;
        padding: 8px 14px;
        box-sizing: border-box;
    }

    .sim-stage {
        padding: 16px 12px;
        gap: 16px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .sim-source-card {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .sim-source-card h3 {
        font-size: 1.15rem !important;
    }

    .sim-connector {
        flex-direction: row;
        gap: 10px;
        padding: 2px 0;
    }

    .sim-pulse-line {
        width: 28px;
    }

    .sim-appliances-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sim-appliance-item {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .sim-footer-metrics {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 18px;
    }

    .sim-metric-val {
        font-size: 1.35rem;
    }

    /* Sticky Stacking Deck Mobile Tuning */
    .sticky-deck-section {
        padding: 44px 0 64px;
    }

    .sticky-deck-title {
        font-size: 1.85rem;
        line-height: 1.15;
        margin: 10px 0 14px;
    }

    .sticky-deck-sub {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .sticky-deck-cards-col {
        gap: 20px;
    }

    .sticky-stack-card {
        position: sticky;
        top: calc(72px + (var(--card-index, 0) * 12px));
        padding: 22px 18px;
        min-height: auto;
        border-radius: 18px;
        box-shadow: 0 10px 30px -6px rgba(12, 52, 35, 0.12);
    }

    .sticky-card-step-num {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .sticky-card-title {
        font-size: 1.25rem;
        margin-bottom: 8px;
        line-height: 1.25;
    }

    .sticky-card-sub {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .sticky-card-tags {
        margin-top: 16px;
        gap: 6px;
    }

    .sticky-card-tag {
        font-size: 0.72rem;
        padding: 3px 8px;
    }

    /* Framer Scroll Scrub Text Mobile Tuning */
    .framer-text-scroll-section {
        padding: 44px 0;
    }

    .framer-scrub-text {
        font-size: 1.35rem;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .sim-title {
        font-size: 1.35rem;
    }

    .sticky-deck-title {
        font-size: 1.6rem;
    }

    .sticky-stack-card {
        top: calc(68px + (var(--card-index, 0) * 10px));
        padding: 18px 16px;
    }
}

/* 14. ACCESSIBILITY: PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .motion-reveal-init {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .motion-tilt-card {
        transform: none !important;
        transition: none !important;
    }
    .motion-tilt-card::before {
        display: none !important;
    }
    .bento-bar.filled::after {
        display: none !important;
    }
    .hero-sine-canvas {
        display: none !important;
    }
    .bento-eyebrow-dot::after {
        display: none !important;
    }
}
