/* =========================
   FEATURE-CARD.CSS – FULLY RESPONSIVE (IMAGES CENTERED)
   Purple background, green cards, left-aligned header
   Cards stack on mobile, images centered, fluid spacing
========================= */

.features {
    width: 100%;
    padding: 80px 0;
    background: #1e1029;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
    box-sizing: border-box;
}

/* ----- HEADER – left aligned, responsive text ----- */
.features .section-header {
    text-align: left;
    margin-bottom: 60px;
}

.features .section-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.features .section-tag hr {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #4ade80, #c084fc);
    border: none;
    margin: 0;
}

.features .section-tag h5 {
    color: #4ade80;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.features .section-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #e2d6f0;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    display: block;
    width: 100%;
    position: relative;
    padding-bottom: 12px;
}

.features .section-header h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #4ade80, #c084fc);
    border-radius: 2px;
}

.features .section-header p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #d1e0d6;
    line-height: 1.5;
    max-width: 650px;
    margin: 0;
    text-align: left;
    width: 100%;
}

/* ----- FEATURE GRID – responsive cards ----- */
.feature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.feature-card {
    flex: 1 1 280px;
    max-width: 320px;
    background: rgba(10, 31, 26, 0.7);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: #c084fc;
    box-shadow: 0 16px 30px rgba(192, 132, 252, 0.2);
    background: rgba(10, 31, 26, 0.9);
}

/* ----- CENTER THE IMAGE HORIZONTALLY ----- */
.feature-card figure {
    margin: 0 0 24px 0;
    text-align: center;
}

/* ----- ANIMATED ICONS -----
   Drawn as SVG so their parts can move. Each card's icon only animates
   while the card is on screen (js/effects.js adds .is-playing), and stays
   still for visitors who turned on "reduce motion". */
.feature-card .kx-icon {
    width: clamp(55px, 12vw, 70px);
    height: auto;
    display: inline-block;
    color: #00ff00;
    overflow: visible;
    filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.4));
    transition: filter 0.3s ease, transform 0.3s ease;
    --kx-icon-hole: #0f1d1e;
}
.feature-card:hover .kx-icon {
    filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.6));
    transform: scale(1.05);
    --kx-icon-hole: #0c1d1b;
}
.kx-icon .kx-a {
    transform-box: view-box;
    animation-play-state: paused;        /* runs only while the card is on screen */
}
.feature-card.is-playing .kx-icon .kx-a { animation-play-state: running; }

/* Redefining Future: hands turn, a signal runs along the arrow, time dots tick */
.kx-future-min  { transform-origin: 26px 38px; animation: kxi-spin 6s linear infinite; }
.kx-future-hour { transform-origin: 26px 38px; animation: kxi-spin 72s linear infinite; }
.kx-future-flow {
    stroke: #c9ffc9;
    stroke-dasharray: 9 91;
    stroke-dashoffset: 100;
    opacity: 0.9;
    animation: kxi-flow 2.6s cubic-bezier(.45,0,.25,1) infinite;
}
.kx-dot { animation: kxi-tick 2.5s ease-in-out infinite; }
.kx-dot:nth-child(2) { animation-delay: 0.25s; }
.kx-dot:nth-child(3) { animation-delay: 0.5s; }
.kx-dot:nth-child(4) { animation-delay: 0.75s; }
.kx-dot:nth-child(5) { animation-delay: 1s; }

/* Tailored Brilliance: gear turns, arrows pulse inwards in turn */
.kx-gear { transform-origin: 32px 32px; animation: kxi-spin 10s linear infinite; }
.kx-arrow { animation: kxi-in-n 2.4s ease-in-out infinite; }
.kx-arrow--e { animation-name: kxi-in-e; animation-delay: 0.6s; }
.kx-arrow--s { animation-name: kxi-in-s; animation-delay: 1.2s; }
.kx-arrow--w { animation-name: kxi-in-w; animation-delay: 1.8s; }

/* Maximizing Impact: bars grow, trend line draws, arrow lands */
.kx-bar { transform-origin: 0 56px; animation: kxi-grow 4.8s cubic-bezier(.3,.7,.3,1) infinite; }
.kx-bar:nth-child(2) { animation-delay: 0.12s; }
.kx-bar:nth-child(3) { animation-delay: 0.24s; }
.kx-bar:nth-child(4) { animation-delay: 0.36s; }
.kx-trend { stroke-dasharray: 100; animation: kxi-draw 4.8s ease-in-out infinite; }
.kx-trend-head { transform-origin: 52px 9px; animation: kxi-land 4.8s ease-in-out infinite; }

/* Visionary Innovation: rays shimmer, the eye looks around and blinks */
.kx-ray { transform-origin: 32px 30px; animation: kxi-shine 2.8s ease-in-out infinite; }
.kx-ray:nth-child(2), .kx-ray:nth-child(3) { animation-delay: 0.2s; }
.kx-ray:nth-child(4), .kx-ray:nth-child(5) { animation-delay: 0.4s; }
.kx-ray:nth-child(6), .kx-ray:nth-child(7) { animation-delay: 0.6s; }
.kx-ray:nth-child(8), .kx-ray:nth-child(9) { animation-delay: 0.8s; }
.kx-eye   { transform-origin: 32px 30px; animation: kxi-blink 5s ease-in-out infinite; }
.kx-pupil { animation: kxi-look 5s ease-in-out infinite; }

@keyframes kxi-spin  { to { transform: rotate(360deg); } }
@keyframes kxi-flow  { 0% { stroke-dashoffset: 100; opacity: 0; } 12% { opacity: .9; } 85% { opacity: .9; } 100% { stroke-dashoffset: 9; opacity: 0; } }
@keyframes kxi-tick  { 0%, 100% { opacity: .35; } 40% { opacity: 1; } }
@keyframes kxi-in-n  { 0%, 60%, 100% { transform: translateY(0); }  25% { transform: translateY(3px); } }
@keyframes kxi-in-e  { 0%, 60%, 100% { transform: translateX(0); }  25% { transform: translateX(-3px); } }
@keyframes kxi-in-s  { 0%, 60%, 100% { transform: translateY(0); }  25% { transform: translateY(-3px); } }
@keyframes kxi-in-w  { 0%, 60%, 100% { transform: translateX(0); }  25% { transform: translateX(3px); } }
@keyframes kxi-grow  { 0% { transform: scaleY(.25); } 30%, 82% { transform: scaleY(1); } 100% { transform: scaleY(.25); } }
@keyframes kxi-draw  { 0%, 22% { stroke-dashoffset: 100; opacity: 0; } 24% { opacity: 1; } 52%, 82% { stroke-dashoffset: 0; opacity: 1; } 94% { stroke-dashoffset: 96; opacity: 1; } 96%, 100% { stroke-dashoffset: 100; opacity: 0; } }
@keyframes kxi-land  { 0%, 48% { opacity: 0; transform: scale(.4); } 56% { opacity: 1; transform: scale(1.18); } 62%, 82% { opacity: 1; transform: scale(1); } 92%, 100% { opacity: 0; transform: scale(.4); } }
@keyframes kxi-shine { 0%, 100% { opacity: .45; transform: scale(.92); } 45% { opacity: 1; transform: scale(1.06); } }
@keyframes kxi-blink { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.08); } }
@keyframes kxi-look  { 0%, 8% { transform: translateX(0); } 20%, 34% { transform: translateX(-3.4px); } 58%, 72% { transform: translateX(3.4px); } 86%, 100% { transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
    .kx-icon .kx-a { animation: none !important; }
    .kx-future-flow { opacity: 0; }
}

.feature-card h4 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 600;
    color: #c084fc;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.feature-card p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #b8c4bc;
    line-height: 1.5;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet (≤ 900px): reduce padding, allow cards to be more flexible */
@media (max-width: 900px) {
    .features {
        padding: 60px 0;
    }
    .features .section-header {
        margin-bottom: 40px;
    }
    .feature-grid {
        gap: 25px;
    }
    .feature-card {
        flex-basis: 280px;
        max-width: 100%;
    }
}

/* Mobile (≤ 768px): stack cards in a single column */
@media (max-width: 768px) {
    .feature-grid {
        flex-direction: column;
        align-items: center;
    }
    .feature-card {
        max-width: 400px;
        width: 100%;
    }
    .features .section-header h2 {
        margin-bottom: 16px;
    }
}

/* Small phones (≤ 480px): tighter card padding */
@media (max-width: 480px) {
    .feature-card {
        padding: 24px 16px;
    }
    .feature-card h4 {
        margin-bottom: 12px;
    }
    .feature-card p {
        line-height: 1.4;
    }
}

/* Very narrow (≤ 360px): reduce image size and font */
@media (max-width: 360px) {
    .feature-card .kx-icon {
        width: 50px;
    }
    .feature-card h4 {
        font-size: 1.1rem;
    }
    .feature-card p {
        font-size: 0.8rem;
    }
}