/* =========================================
   HOME PAGE SPECIFIC STYLES
   ========================================= */

/* --- ANIMATIONS --- */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtle-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.1);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-200 {
    animation-delay: 0.2s;
}

/* --- HOME HERO --- */
.home-hero {
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background-color: var(--color-bg);
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.mesh-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
    mix-blend-mode: overlay;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: subtle-drift 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background-color: rgba(50, 164, 189, 0.1);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background-color: rgba(42, 45, 53, 0.2);
    animation-delay: -5s;
}

.blob-3 {
    top: 20%;
    right: 20%;
    width: 30vw;
    height: 30vw;
    background-color: rgba(50, 164, 189, 0.05);
    animation-delay: -10s;
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 45, 53, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 45, 53, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

/* --- HERO SECTION REWRITE --- */
.section-hero {
    padding-top: 8rem;
    padding-bottom: 2rem;
    /* Reduced bottom padding */
    position: relative;
    overflow: visible;
}

/* Glow Effect */
.text-gradient-glow {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.5));
    /* Fix for clipped descenders (like 'g') */
    padding-bottom: 0.2em;
    margin-bottom: -0.2em;
    line-height: 1.2;
}

.hero-glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.15) 0%, rgba(13, 13, 15, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

@media (min-width: 1024px) {
    .section-hero {
        /* Center hero content visually when there's no right image */
        display: flex;
        align-items: center;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        /* Full width since no image */
        max-width: 900px;
        /* Constrain width for readability */
        margin: 0 auto;
        text-align: center;
    }

    .hero-main-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats-horizontal {
        justify-content: center;
    }
}

.hero-eyebrow {
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    display: block;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-title span {
    color: var(--color-text-muted);
}

.hero-lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    font-weight: 300;
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
    }
}


.hero-stats-horizontal {
    display: flex;
    flex-wrap: wrap;
    /* Ensure wrapping on very small screens */
    justify-content: center;
    gap: 1rem;
    /* Reduced gap for mobile safety */
    padding-top: 0;
    /* Removed padding */
    border-top: none;
    /* Removed border */
    width: 100%;
    margin-top: 1rem;
    /* Closer to buttons */
    align-items: center;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-item .stat-val {
    font-size: 2rem;
    /* Slightly smaller */
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.hero-stat-item .stat-key {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(249, 250, 251, 0.5);
}


/* --- PROBLEM SECTION --- */
.section-problem {
    margin-top: 2rem;
    padding-top: 5rem;
    padding-bottom: 5rem;
    border-top: none;
    position: relative;
}

.problem-grid {
    display: grid;
    gap: 4rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .problem-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8rem;
        /* More breathing room */
    }
}

.problem-cards {
    position: relative;
    padding-left: 2rem;
    border-left: 1px solid rgba(42, 45, 53, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.problem-card {
    position: relative;
    padding: 1rem 0;
    transition: all 0.3s;
}

.problem-card-indicator {
    position: absolute;
    left: -2.125rem;
    top: 1.5rem;
    width: 2px;
    height: 2rem;
    background-color: var(--color-accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.problem-card:hover .problem-card-indicator {
    opacity: 1;
}

.problem-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.problem-card-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* --- SERVICES LIST --- */
.section-services-list {
    padding: 5rem 0;
    border-top: none;
}

.services-header {
    margin-bottom: 4rem;
    max-width: 50rem;
}

.services-grid-list {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .services-grid-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-list-item {
    position: relative;
    padding: 2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-enterprise);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-list-item:hover {
    transform: translateY(-6px);
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    background: rgba(50, 164, 189, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
    transition: all 0.3s;
}

.service-list-item:hover .service-icon-box {
    background: rgba(50, 164, 189, 0.2);
    transform: scale(1.05);
}

.service-list-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 10;
}

.service-list-desc {
    color: rgba(249, 250, 251, 0.6);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
    line-height: 1.7;
    font-size: 0.95rem;
}

.service-more-link {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    display: inline-block;
    transition: transform 0.3s;
}

.service-list-item:hover .service-more-link {
    transform: translateX(5px);
}

/* --- PROCESS --- */
.section-process {
    padding: 8rem 0;
    background-color: var(--color-bg);
}

.process-header {
    margin-bottom: 5rem;
}

.process-layers {
    border-top: 1px solid var(--color-border);
}

.process-layer {
    display: grid;
    border-bottom: 1px solid var(--color-border);
    min-height: 200px;
    transition: background-color 0.3s;
}

.process-layer:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

@media (min-width: 768px) {
    .process-layer {
        grid-template-columns: repeat(12, 1fr);
    }
}

.layer-index {
    padding: 2rem 0;
    position: relative;
    border-right: 1px solid transparent;
}

@media (min-width: 768px) {
    .layer-index {
        grid-column: span 3;
        padding: 3rem 0;
        border-right: 1px solid rgba(42, 45, 53, 0.5);
    }
}

.layer-id {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 300;
    color: rgba(249, 250, 251, 0.2);
    display: block;
    margin-left: 0;
}

@media (min-width: 768px) {
    .layer-id {
        margin-left: auto;
        margin-right: 2rem;
        text-align: right;
    }
}

.layer-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--color-accent);
    opacity: 0;
    transition: opacity 0.5s;
}

.process-layer:hover .layer-indicator {
    opacity: 1;
}

.layer-content {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .layer-content {
        grid-column: span 9;
        padding: 3rem 4rem;
    }
}

.layer-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

/* --- WHY US (NEW GRID) --- */
.section-why {
    padding: 1rem 0;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.why-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    padding: 2.5rem;
    border-radius: var(--radius-enterprise);
    transition: all 0.3s ease;
}

.why-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    background-color: rgba(255, 255, 255, 0.04);
}

.why-icon-box {
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.why-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}


/* --- FINAL CTA --- */
.section-final-cta {
    margin-top: 2rem;
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-bg-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(50, 164, 189, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.final-cta-content {
    position: relative;
    z-index: 10;
}

@media (max-width: 640px) {
    .section-final-cta {
        padding: 4rem 0;
    }

    /* Process Section Mobile Optimization */
    .section-process {
        padding: 4rem 0;
    }

    .process-header {
        margin-bottom: 3rem;
    }

    .process-layer {
        min-height: auto;
        display: flex;
        flex-direction: column;
        padding-bottom: 1rem;
    }

    .layer-index {
        padding: 1.5rem 0 0.25rem;
        border: none;
    }

    .layer-id {
        font-size: 1.25rem;
        color: var(--color-accent);
        opacity: 0.8;
    }

    .layer-content {
        padding: 0.25rem 0 1.5rem;
    }

    .layer-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }

    /* Hero Mobile Optimization */
    .section-hero {
        padding-top: 8.5rem;
    }

    .hero-main-text {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 2.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-lead {
        font-size: 1.125rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    /* Hero Stats on One Line */
    .hero-stats-horizontal {
        flex-wrap: nowrap;
        gap: 0.5rem;
        justify-content: space-around;
        width: 100%;
        padding: 0 0.5rem;
    }

    .hero-stat-item .stat-val {
        font-size: 1.5rem;
        margin-bottom: 0.125rem;
    }

    .hero-stat-item .stat-key {
        font-size: 0.625rem;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }
}