/* ================================================================
   KROXIA PREMIUM ANIMATIONS & RESPONSIVE SYSTEM v2.0
   High-quality scroll reveals, micro-interactions, transitions
   ================================================================ */

/* -----------------------------------------------
   ANIMATION KEYFRAMES
----------------------------------------------- */
@keyframes kxFadeInUp      { from { opacity:0; transform:translateY(40px); }  to { opacity:1; transform:translateY(0); } }
@keyframes kxFadeInDown    { from { opacity:0; transform:translateY(-40px); } to { opacity:1; transform:translateY(0); } }
@keyframes kxFadeInLeft    { from { opacity:0; transform:translateX(-50px); } to { opacity:1; transform:translateX(0); } }
@keyframes kxFadeInRight   { from { opacity:0; transform:translateX(50px); }  to { opacity:1; transform:translateX(0); } }
@keyframes kxZoomIn        { from { opacity:0; transform:scale(0.85); }        to { opacity:1; transform:scale(1); } }
@keyframes kxZoomInUp      { from { opacity:0; transform:scale(0.85) translateY(30px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes kxSlideInLeft   { from { opacity:0; transform:translateX(-80px); } to { opacity:1; transform:translateX(0); } }
@keyframes kxSlideInRight  { from { opacity:0; transform:translateX(80px); }  to { opacity:1; transform:translateX(0); } }
@keyframes kxFlipIn        { from { opacity:0; transform:rotateX(-20deg) translateY(20px); } to { opacity:1; transform:rotateX(0) translateY(0); } }

@keyframes kxFloat         { 0%,100% { transform: translateY(0px); }  50% { transform: translateY(-14px); } }
@keyframes kxFloat2        { 0%,100% { transform: translateY(0px) rotate(0deg); }  50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes kxOrb           { 0%,100% { transform: translate(0,0) scale(1); }  33% { transform: translate(20px,-15px) scale(1.05); }  66% { transform: translate(-10px,10px) scale(0.97); } }
@keyframes kxOrb2          { 0%,100% { transform: translate(0,0) scale(1); }  33% { transform: translate(-20px,15px) scale(1.03); }  66% { transform: translate(10px,-10px) scale(0.98); } }
@keyframes kxSpin          { to { transform: rotate(360deg); } }
@keyframes kxSpinSlow      { to { transform: rotate(360deg); } }
@keyframes kxPulseGlow     { 0%,100% { box-shadow: 0 0 0 0 rgba(91,92,240,.4); }  50% { box-shadow: 0 0 0 14px rgba(91,92,240,0); } }
@keyframes kxShimmer       { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes kxTickerScroll  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes kxGradientShift { 0%,100% { background-position: 0% 50%; }  50% { background-position: 100% 50%; } }
@keyframes kxBorderPulse   { 0%,100% { border-color: rgba(91,92,240,.2); }  50% { border-color: rgba(91,92,240,.6); } }
@keyframes kxCountUp       { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes kxWave          { 0%,100% { transform: scaleY(1); }  50% { transform: scaleY(1.6); } }
@keyframes kxMorphBlob     {
    0%,100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25%     { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50%     { border-radius: 50% 60% 30% 60% / 30% 40% 70% 50%; }
    75%     { border-radius: 40% 60% 60% 30% / 60% 30% 40% 70%; }
}

/* -----------------------------------------------
   SCROLL REVEAL — BASE STATES
   Elements start hidden, JS adds .kx-revealed
----------------------------------------------- */
[data-kx-anim] {
    opacity: 0;
    will-change: opacity, transform;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    transition-property: opacity, transform;
}
[data-kx-anim="fade-up"]    { transform: translateY(40px); }
[data-kx-anim="fade-down"]  { transform: translateY(-30px); }
[data-kx-anim="fade-left"]  { transform: translateX(-50px); }
[data-kx-anim="fade-right"] { transform: translateX(50px); }
[data-kx-anim="zoom-in"]    { transform: scale(0.88); }
[data-kx-anim="zoom-up"]    { transform: scale(0.88) translateY(30px); }
[data-kx-anim="flip"]       { transform: rotateX(-20deg) translateY(20px); }

[data-kx-anim].kx-revealed {
    opacity: 1 !important;
    transform: none !important;
    transition-duration: 0.75s;
}

/* Stagger delays */
[data-kx-delay="100"] { transition-delay: 0.10s; }
[data-kx-delay="150"] { transition-delay: 0.15s; }
[data-kx-delay="200"] { transition-delay: 0.20s; }
[data-kx-delay="300"] { transition-delay: 0.30s; }
[data-kx-delay="400"] { transition-delay: 0.40s; }
[data-kx-delay="500"] { transition-delay: 0.50s; }
[data-kx-delay="600"] { transition-delay: 0.60s; }
[data-kx-delay="700"] { transition-delay: 0.70s; }

/* -----------------------------------------------
   HERO SECTION PREMIUM ANIMATIONS
----------------------------------------------- */
.hero-v7 {
    background: linear-gradient(135deg, #fff 0%, #f8f6ff 50%, #fff 100%);
}
[data-theme="dark"] .hero-v7 {
    background: linear-gradient(135deg, #080d1a 0%, #0a0f1e 60%, #0d0a1f 100%);
}

/* Animated gradient mesh background */
.hero-v7::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(ellipse, rgba(91,92,240,.12) 0%, transparent 65%);
    border-radius: 50%;
    animation: kxOrb 12s ease-in-out infinite;
    pointer-events: none;
}
.hero-v7::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(124,77,255,.10) 0%, transparent 65%);
    border-radius: 50%;
    animation: kxOrb2 15s ease-in-out infinite;
    pointer-events: none;
}
[data-theme="dark"] .hero-v7::before {
    background: radial-gradient(ellipse, rgba(91,92,240,.18) 0%, transparent 65%);
}
[data-theme="dark"] .hero-v7::after {
    background: radial-gradient(ellipse, rgba(124,77,255,.15) 0%, transparent 65%);
}

/* Hero content entrance */
.hero-v7-content { animation: kxFadeInLeft 0.9s cubic-bezier(0.22,1,0.36,1) 0.15s both; }
.hero-v7-visual  { animation: kxFadeInRight 0.9s cubic-bezier(0.22,1,0.36,1) 0.25s both; }

/* Hero title animated gradient */
.hero-v7-highlight {
    background: linear-gradient(135deg, #5B5CF0, #7C4DFF, #ec4899, #5B5CF0);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: kxGradientShift 4s ease infinite;
}

/* Hero floating cards */
.hero-v7-float {
    animation: kxFloat 5s ease-in-out infinite;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-v7-float:hover {
    transform: translateY(-4px) scale(1.03) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,.15) !important;
}
.hero-v7-float-1 { animation-delay: 0s; }
.hero-v7-float-2 { animation-delay: 1.5s; }

/* Hero image morphing blob */
.hero-v7-img-bg {
    animation: kxMorphBlob 10s ease-in-out infinite;
}

/* Hero orbs */
.hero-v7-orb-1 { animation: kxOrb  8s ease-in-out infinite; }
.hero-v7-orb-2 { animation: kxOrb2 10s ease-in-out infinite 1s; }
.hero-v7-orb-3 { animation: kxFloat 6s ease-in-out infinite 2s; }

/* Ticker scroll */
.hero-v7-ticker-track {
    animation: kxTickerScroll 25s linear infinite;
}
.hero-v7-ticker:hover .hero-v7-ticker-track {
    animation-play-state: paused;
}

/* Badge entrance + pulse border */
.hero-v7-badge {
    animation: kxFadeInDown 0.7s ease 0.4s both, kxBorderPulse 3s ease 1s infinite;
}

/* Stat chips stagger */
.hero-v7-stats-grid .hero-v7-stat-chip:nth-child(1) { animation: kxZoomIn 0.6s ease 0.5s both; }
.hero-v7-stats-grid .hero-v7-stat-chip:nth-child(2) { animation: kxZoomIn 0.6s ease 0.65s both; }
.hero-v7-stats-grid .hero-v7-stat-chip:nth-child(3) { animation: kxZoomIn 0.6s ease 0.8s both; }

/* Stat chip hover */
.hero-v7-stat-chip {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}
.hero-v7-stat-chip:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(91,92,240,.2);
}

/* Hero image parallax */
.hero-v7-img {
    transition: transform 0.6s ease;
}
.hero-v7-img-wrap:hover .hero-v7-img {
    transform: scale(1.03);
}

/* -----------------------------------------------
   SECTION CARDS — PREMIUM HOVER EFFECTS
----------------------------------------------- */
/* Service cards */
.kx-os-card, .service-card, .service-item {
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}
.kx-os-card::before, .service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(91,92,240,.05), rgba(124,77,255,.05));
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: inherit;
    pointer-events: none;
}
.kx-os-card:hover, .service-card:hover, .service-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 60px rgba(91,92,240,.18);
}
.kx-os-card:hover::before, .service-card:hover::before {
    opacity: 1;
}

/* Why Choose Us feature items */
.kx-wcu-feature {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.kx-wcu-feature:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(91,92,240,.15);
}

/* Process steps */
.kx-process-step {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.kx-process-step:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(91,92,240,.15);
}

/* Portfolio items */
.kx-portfolio-item, .portfolio-item {
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease;
    overflow: hidden;
}
.kx-portfolio-item:hover, .portfolio-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 24px 60px rgba(0,0,0,.18);
}

/* Team member cards */
.kx-team-card, .team-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}
.kx-team-card:hover, .team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(91,92,240,.2);
}

/* Case study / success stories */
.kx-cs-card, .case-study-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.kx-cs-card:hover, .case-study-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0,0,0,.16);
}

/* Pricing cards */
.kx-pricing-card, .pricing-card {
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1),
                box-shadow 0.35s ease;
}
.kx-pricing-card:hover, .pricing-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 28px 70px rgba(91,92,240,.22);
}

/* FAQ items */
.faq-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.faq-item:hover {
    transform: translateX(4px);
}

/* Client testimonial cards */
.kx-clu-card, .testimonial-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.kx-clu-card:hover, .testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,.12);
}

/* -----------------------------------------------
   BUTTON PREMIUM EFFECTS
----------------------------------------------- */
.btn-primary, .hero-v7-btn-primary {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.btn-primary::after, .hero-v7-btn-primary::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    transform: translate(-50%,-50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}
.btn-primary:active::after, .hero-v7-btn-primary:active::after {
    width: 300px; height: 300px;
}
.btn-primary:hover, .hero-v7-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 40px rgba(91,92,240,.45);
}

.btn-outline, .hero-v7-btn-outline {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.btn-outline:hover, .hero-v7-btn-outline:hover {
    transform: translateY(-3px) scale(1.02);
}

/* -----------------------------------------------
   SECTION HEADERS — ENTRANCE ANIMATION
----------------------------------------------- */
.kx-section-header, .section-header {
    position: relative;
}
.kx-section-badge {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.kx-section-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91,92,240,.2);
}

/* Animated underline on section titles */
.kx-section-title .kx-highlight,
.kx-section-title .text-primary {
    position: relative;
    display: inline-block;
}
.kx-section-title .kx-highlight::after,
.kx-section-title .text-primary::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--kroxia-primary), var(--kroxia-accent));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.22,1,0.36,1) 0.3s;
}
.kx-section-header.kx-revealed .kx-section-title .kx-highlight::after,
.kx-section-header.kx-revealed .kx-section-title .text-primary::after {
    transform: scaleX(1);
}

/* -----------------------------------------------
   ICON ANIMATIONS
----------------------------------------------- */
.kx-os-card .kx-os-icon,
.kx-wcu-feature-icon,
.process-icon,
.kx-process-step-icon {
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.kx-os-card:hover .kx-os-icon,
.kx-wcu-feature:hover .kx-wcu-feature-icon,
.kx-process-step:hover .kx-process-step-icon {
    transform: scale(1.2) rotate(-5deg);
}

/* -----------------------------------------------
   STATS / COUNTER PREMIUM
----------------------------------------------- */
.hero-v7-stat-chip .counter,
.stat-number, .kx-wwd-stat-number {
    display: inline-block;
    animation: kxCountUp 0.6s ease both;
}

/* -----------------------------------------------
   LOGO / BRAND STRIP
----------------------------------------------- */
.kx-clu-brand-logos {
    animation: kxTickerScroll 20s linear infinite;
}
.kx-clu-section:hover .kx-clu-brand-logos {
    animation-play-state: paused;
}

/* -----------------------------------------------
   CONTACT SECTION
----------------------------------------------- */
.kx-contact-form-wrap {
    transition: box-shadow 0.3s ease;
}
.kx-contact-form-wrap:hover {
    box-shadow: 0 24px 70px rgba(91,92,240,.12);
}
.kx-cf-field input,
.kx-cf-field textarea,
.kx-cf-field select {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.kx-cf-field input:focus,
.kx-cf-field textarea:focus,
.kx-cf-field select:focus {
    border-color: var(--kroxia-primary) !important;
    box-shadow: 0 0 0 4px rgba(91,92,240,.12);
    transform: translateY(-1px);
    outline: none;
}

/* -----------------------------------------------
   NAVBAR PREMIUM
----------------------------------------------- */
.site-header {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.site-header.nav-hidden {
    transform: translateY(-100%);
}
.site-header.scrolled .header-inner {
    box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
[data-theme="dark"] .site-header.scrolled .header-inner {
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.nav-menu > li > a {
    position: relative;
}
.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 50%;
    width: 0; height: 2px;
    background: var(--kroxia-primary);
    border-radius: 2px;
    transition: width 0.25s ease, left 0.25s ease;
}
.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after {
    width: 70%; left: 15%;
}

/* Logo hover */
.header-logo .logo-link {
    transition: transform 0.3s ease;
}
.header-logo .logo-link:hover {
    transform: scale(1.05);
}

/* -----------------------------------------------
   FOOTER PREMIUM
----------------------------------------------- */
.site-footer .footer-social-link,
.social-link {
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), background 0.25s ease;
}
.site-footer .footer-social-link:hover,
.social-link:hover {
    transform: translateY(-4px) scale(1.12);
}

/* -----------------------------------------------
   SCROLL PROGRESS BAR
----------------------------------------------- */
#kx-scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--kroxia-primary), var(--kroxia-accent), #ec4899);
    z-index: 99999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* -----------------------------------------------
   BACK TO TOP BUTTON
----------------------------------------------- */
#kx-back-top {
    position: fixed;
    bottom: 28px; right: 28px;
    width: 46px; height: 46px;
    background: linear-gradient(135deg, var(--kroxia-primary), var(--kroxia-accent));
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 8px 24px rgba(91,92,240,.35);
}
#kx-back-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
#kx-back-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 14px 36px rgba(91,92,240,.45);
}

/* -----------------------------------------------
   SECTION DIVIDERS — Animated wave
----------------------------------------------- */
.kx-section-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 24px;
}
.kx-section-wave span {
    display: block;
    width: 3px;
    background: linear-gradient(to top, var(--kroxia-primary), var(--kroxia-accent));
    border-radius: 3px;
    animation: kxWave 1.2s ease-in-out infinite;
}
.kx-section-wave span:nth-child(2) { animation-delay: 0.1s; }
.kx-section-wave span:nth-child(3) { animation-delay: 0.2s; }
.kx-section-wave span:nth-child(4) { animation-delay: 0.3s; }
.kx-section-wave span:nth-child(5) { animation-delay: 0.2s; }

/* -----------------------------------------------
   LOADING SKELETON (shimmer for lazy images)
----------------------------------------------- */
.kx-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: kxShimmer 1.5s infinite;
    border-radius: 8px;
}

/* -----------------------------------------------
   CURSOR GLOW (desktop only)
----------------------------------------------- */
#kx-cursor-glow {
    pointer-events: none;
    position: fixed;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91,92,240,.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* -----------------------------------------------
   PREMIUM RESPONSIVE — ENHANCED BREAKPOINTS
----------------------------------------------- */

/* 1440px — Ultra wide */
@media (min-width: 1440px) {
    .container { max-width: 1360px; }
    .hero-v7-title { font-size: 5.5rem; }
    .kx-section-title { font-size: 3.8rem; }
}

/* 1280px — Large desktop */
@media (max-width: 1280px) {
    .hero-v7-title { font-size: clamp(2.8rem, 4.5vw, 4.5rem); }
    .hero-v7-layout { gap: 48px; }
}

/* 1024px — Tablet landscape */
@media (max-width: 1024px) {
    .hero-v7-layout {
        grid-template-columns: 1fr !important;
        text-align: center;
        padding: 0 0 60px;
        gap: 48px;
    }
    .hero-v7-visual {
        display: flex !important;
        justify-content: center;
        max-width: 420px;
        margin: 0 auto;
    }
    .hero-v7-badge { margin: 0 auto 24px; }
    .hero-v7-actions { justify-content: center; }
    .hero-v7-trust { justify-content: center; }
    .hero-v7-stats-grid { justify-content: center; }
    .hero-v7-subtitle { max-width: 540px; margin-left: auto; margin-right: auto; }

    /* Shrink visual on tablet but keep it visible */
    .hero-v7-img-wrap { max-width: 380px; margin: 0 auto; }
    .hero-v7-float-1,
    .hero-v7-float-2 { display: none; }

    /* Section grids */
    .kx-os-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .kx-wcu-features-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-process-steps { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-team-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .kx-cs-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-pricing-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* 768px — Tablet portrait */
@media (max-width: 768px) {
    /* Hero */
    .hero-v7 { min-height: auto; padding: 100px 0 60px; }
    .hero-v7-title { font-size: clamp(2.2rem, 7vw, 3.2rem) !important; }
    .hero-v7-subtitle { font-size: 1rem; }
    .hero-v7-layout { padding: 0 0 40px; }

    /* Sections */
    .kx-os-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-wcu-features-grid { grid-template-columns: 1fr !important; }
    .kx-process-steps { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-team-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-cs-grid { grid-template-columns: 1fr !important; }
    .kx-pricing-grid { grid-template-columns: 1fr !important; max-width: 480px; margin: 0 auto; }

    /* Contact layout */
    .kx-contact-layout { grid-template-columns: 1fr !important; }
    .kx-contact-form-wrap { padding: 24px !important; }

    /* Footer */
    .footer-grid-3, .footer-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .footer-bottom-inner { flex-direction: column; gap: 16px; text-align: center; }

    /* Buttons */
    .hero-v7-actions { flex-direction: column; align-items: center; gap: 12px; }
    .hero-v7-btn-primary,
    .hero-v7-btn-outline { width: 100%; max-width: 320px; justify-content: center; }

    /* Section padding */
    [class*="kx-"][class*="section"],
    [class*="kx-"][class*="-section"] { padding-top: 64px !important; padding-bottom: 64px !important; }

    /* Header */
    .header-layout { height: 64px !important; }
}

/* 640px — Medium phone */
@media (max-width: 640px) {
    .hero-v7-title { font-size: clamp(2rem, 8vw, 2.8rem) !important; }
    .kx-section-title { font-size: clamp(1.75rem, 6vw, 2.4rem) !important; }

    .kx-os-grid { grid-template-columns: 1fr !important; }
    .kx-team-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .kx-portfolio-grid { grid-template-columns: 1fr !important; }
    .kx-process-steps { grid-template-columns: 1fr !important; }

    .hero-v7-img-wrap { max-width: 300px; }

    /* FAQ */
    .kx-faq-layout { grid-template-columns: 1fr !important; }

    /* Footer */
    .footer-grid-3, .footer-grid-4 { grid-template-columns: 1fr !important; }
}

/* 480px — Small phone */
@media (max-width: 480px) {
    .hero-v7-title { font-size: 2rem !important; }
    .kx-section-title { font-size: 1.7rem !important; }
    .hero-v7-stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .hero-v7-stat-chip { padding: 12px 8px !important; }
    .kx-team-grid { grid-template-columns: 1fr !important; }
    .kx-cs-grid { grid-template-columns: 1fr !important; }
    .kx-pricing-grid { grid-template-columns: 1fr !important; }

    #kx-back-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}

/* 360px — Very small phone */
@media (max-width: 360px) {
    .hero-v7-title { font-size: 1.75rem !important; }
    .kx-section-title { font-size: 1.5rem !important; }
    .hero-v7-badge { font-size: 0.75rem; padding: 6px 12px; }
    .container { padding-left: 14px; padding-right: 14px; }
}

/* -----------------------------------------------
   REDUCED MOTION — ACCESSIBILITY
----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    [data-kx-anim],
    .hero-v7-content,
    .hero-v7-visual,
    .hero-v7-float,
    .hero-v7-img-bg,
    .hero-v7-badge,
    .hero-v7-stat-chip,
    .kx-ticker-track,
    .hero-v7-ticker-track,
    #kx-scroll-progress {
        animation: none !important;
        transition: none !important;
    }
    [data-kx-anim] { opacity: 1 !important; transform: none !important; }
}
