/* ============================================
   TOP WP — Animations
   ============================================ */

/* ---- Staggered fade-in ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.2); }
    50%      { box-shadow: 0 0 40px rgba(99,102,241,0.4); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes gradientRotate {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(99,102,241,0.2); }
    50%      { border-color: rgba(99,102,241,0.5); }
}

/* ---- Counter animation ---- */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- 3D Tilt card ---- */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.1s ease;
}

.tilt-card-inner {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Magnetic button ---- */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

/* ---- Glow border on hover ---- */
.glow-border {
    position: relative;
}

.glow-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: var(--gradient-accent);
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: opacity 0.4s;
}

.glow-border:hover::after {
    opacity: 0.3;
}

/* ---- Text gradient shimmer ---- */
.shimmer-text {
    background: linear-gradient(
        90deg,
        var(--accent-1) 0%,
        var(--accent-3) 25%,
        #fff 50%,
        var(--accent-3) 75%,
        var(--accent-1) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ---- Smooth page transition ---- */
.page-transition-enter {
    opacity: 0;
    transform: translateY(10px);
}

.page-transition-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Scroll progress bar ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-accent);
    z-index: 10000;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ---- Loading skeleton ---- */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-surface) 25%,
        var(--bg-surface-2) 50%,
        var(--bg-surface) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* ---- Before/After Slider ---- */
.ba-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: ew-resize;
    user-select: none;
}

.ba-slider img {
    display: block;
    width: 100%;
    height: auto;
}

.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.ba-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-width: 0;
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #fff;
    cursor: ew-resize;
    z-index: 5;
    transform: translateX(-50%);
}

.ba-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.ba-handle::after {
    content: '⟨  ⟩';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.3em;
    z-index: 1;
}

/* ---- Health Check ---- */
.health-progress {
    height: 8px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 2rem;
}

.health-progress-bar {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.health-score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: 0 auto 2rem;
    position: relative;
}

.health-score-circle svg {
    position: absolute;
    transform: rotate(-90deg);
}

.health-score-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.health-score-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---- Cost Estimator ---- */
.estimator-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-full);
    outline: none;
    margin: 1rem 0;
}

.estimator-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-accent);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(99,102,241,0.4);
}

.estimator-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-1);
    cursor: pointer;
    border: none;
}

.estimator-price {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    margin: 2rem 0;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Checkbox cards (estimator features) ---- */
.check-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.check-card:hover {
    border-color: var(--border-glass-hover);
}

.check-card.selected {
    border-color: var(--accent-1);
    background: rgba(99,102,241,0.08);
}

.check-card input[type="checkbox"] { display: none; }

.check-card .check-indicator {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.check-card.selected .check-indicator {
    background: var(--gradient-accent);
    border-color: transparent;
}

.check-card .check-label {
    font-size: 0.9rem;
    font-weight: 500;
}

.check-card .check-price {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}
