/* Homepage — uses site tokens from main.min.css */

.home-page {
    overflow: visible;
}

.home-section {
    margin-top: 2.5rem;
}

.home-panel {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 1.75rem;
    box-shadow: 0 2px 10px rgba(2, 38, 89, 0.05);
}

.home-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-primary-100);
    background: var(--bs-primary-800);
    border-radius: 50px;
    padding: 0.35rem 0.85rem;
}

.home-title {
    color: var(--bs-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.home-subtitle {
    color: var(--bs-dark-300);
    max-width: 36rem;
}

.home-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.home-link {
    color: var(--bs-primary-100);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.home-link:hover {
    color: var(--bs-primary-200);
    text-decoration: underline;
}

/* Hero */
.home-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    min-height: 420px;
    background: linear-gradient(135deg, #252C36 0%, var(--bs-primary) 55%, var(--bs-primary-100) 100%);
    color: #fff;
}

.home-hero-threads {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.45;
    pointer-events: none;
    mix-blend-mode: screen;
}

.home-hero-threads canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(105, 166, 252, 0.28), transparent 42%),
        radial-gradient(circle at 10% 90%, rgba(3, 64, 150, 0.35), transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.home-hero-inner {
    position: relative;
    z-index: 2;
    padding: 3.5rem 1.5rem 3rem;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    border-radius: 50px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.home-hero h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.home-hero .lead {
    color: rgba(255, 255, 255, 0.86);
    max-width: 38rem;
}

.home-search {
    max-width: 640px;
}

.home-search .autocomplete-input {
    border: 0 !important;
    background: #fff !important;
    padding: 1rem 3.25rem 1rem 1.35rem;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(2, 38, 89, 0.18);
}

.home-search .autocomplete-input:focus {
    outline: 2px solid var(--bs-primary-400) !important;
    border: 0 !important;
}

.home-search .autocomplete-input::placeholder {
    color: var(--bs-dark-400) !important;
}

.home-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-primary-100);
    pointer-events: none;
    z-index: 2;
}

.home-hero-actions .btn {
    min-width: 160px;
}

/* Stats */
.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.home-stat {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    box-shadow: 0 2px 10px rgba(2, 38, 89, 0.05);
}

.home-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary-800);
    color: var(--bs-primary-100);
    flex-shrink: 0;
}

.home-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--bs-primary);
    line-height: 1.1;
}

.home-stat-label {
    font-size: 0.85rem;
    color: var(--bs-dark-300);
    font-weight: 500;
}

/* How it works */
.home-step {
    height: 100%;
    background: var(--bs-primary-800);
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    transition: 0.3s ease;
}

.home-step:hover {
    background: #fff;
    box-shadow: 0 8px 24px rgba(3, 64, 150, 0.1);
    transform: translateY(-4px);
}

.home-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

/* Categories */
.home-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    background: var(--bs-primary-800);
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    height: 100%;
    transition: 0.3s ease;
}

.home-category:hover {
    background: #fff;
    border-color: var(--bs-primary-700);
    box-shadow: 0 8px 22px rgba(3, 64, 150, 0.12);
    transform: translateY(-4px);
}

.home-category-icon {
    width: 72px;
    height: 72px;
    max-width: 72px;
    min-height: 72px;
    border-radius: 16px;
    object-fit: cover;
    background: #fff;
    margin-bottom: 0.85rem;
}

.home-category-fallback {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: #fff;
    color: var(--bs-primary-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.home-category-name {
    color: var(--bs-dark-100);
    font-weight: 700;
    font-size: 1rem;
}

/* Services */
.home-service {
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(circle at 18% 20%, var(--bs-primary-100) 0%, var(--bs-primary) 72%);
    color: #fff;
    padding: 1.5rem 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    transition: 0.35s ease;
}

.home-service:nth-child(2),
.home-service.alt {
    background: radial-gradient(circle at 85% 15%, var(--bs-primary-200) 0%, var(--bs-primary) 68%);
}

.home-service:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(2, 38, 89, 0.22);
}

.home-service img {
    width: 100%;
    max-width: 220px;
    margin: 0 auto 1rem;
    display: block;
}

.home-service h3 {
    font-weight: 800;
}

.home-service p {
    color: var(--bs-primary-700);
    margin-bottom: 0;
}

/* Project / blog cards */
.home-price {
    font-weight: 800;
    color: var(--bs-primary-100);
    font-size: 0.95rem;
}

.home-empty {
    background: var(--bs-primary-800);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--bs-dark-300);
}

/* CTA */
.home-cta {
    border-radius: 16px;
    background: linear-gradient(120deg, var(--bs-primary) 0%, var(--bs-primary-100) 100%);
    color: #fff;
    padding: 2.5rem 1.75rem;
}

.home-cta h2 {
    font-weight: 800;
}

.home-cta p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-on-scroll,
    .home-step,
    .home-category,
    .home-service,
    .custom-card {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .home-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-hero-inner {
        padding: 2.75rem 1.25rem 2.25rem;
    }
}

@media (max-width: 575.98px) {
    .home-stats {
        grid-template-columns: 1fr;
    }

    .home-panel,
    .home-cta {
        padding: 1.75rem 1.15rem;
    }

    .home-hero {
        min-height: 0;
    }

    .home-hero h1 {
        font-size: 1.85rem;
    }
}
