/* * ==========================================
         * HERO SECTION STYLING
         * ==========================================
         */
.edgecraft-hero {
    position: relative;
    width: 100% !important;
    max-width: 100vw;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--theme-palette-color-7, #f8f9fb);
    background-image: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 8%, transparent) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 8%, transparent) 0%, transparent 50%);
    overflow: hidden;
    padding: 4rem 2rem;
    box-sizing: border-box;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1; 
}

.hero-container {
    position: relative;
    z-index: 10;
    max-width: 900px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 8%, transparent);
    color: var(--theme-palette-color-1, #7b866e);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 20%, transparent);
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 1.5rem 0;
    margin-bottom: 2rem !important;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-title span {
    color: var(--theme-palette-color-1, #7b866e);
    position: relative;
    display: inline-block;
    font-size: 70%;
}

.hero-description {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: 1.8;
    margin: 0 auto 2.5rem auto;
    max-width: 700px;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.hero-cta-wrapper {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

/* High-end CTA Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    color:  #ffffff;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 60%, transparent);
    position: relative;
    overflow: hidden;
    border: none;
}

.btn-primary.btn-order:hover {
    background-color: var(--theme-palette-color-1);
    transform: translateY(-1px);
    color:  #ffffff;
    box-shadow: 0 8px 16px -4px color-mix(in srgb, var(--theme-palette-color-1) 40%, transparent);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}

.btn-primary svg {
    margin-left: 0.75rem;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(5px);
}

a.btn-primary.btn-order {
    background: var(--theme-palette-color-2);
}

a.btn-primary.whatsapp {
    background: #25D366;
}
a.btn-primary.whatsapp:hover {
    background: #1da951;
    color: #ffffff;
}

/* * ==========================================
         * SERVICES SECTION STYLING
         * ==========================================
         */
.edgecraft-services {
    position: relative;
    padding: 5rem 2rem;
    background-color: var(--theme-palette-color-8, #ffffff);
    overflow: hidden;

    width: 100% !important;
    max-width: 100vw
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 7rem;
}

.section-subtitle {
    color: var(--theme-palette-color-2, #C2A25D);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--theme-palette-color-3, #090909);
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1), transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-row.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.service-row:last-child {
    margin-bottom: 0;
}

.service-row.reverse {
    flex-direction: row-reverse;
}

.service-image-wrapper {
    flex: 1;
    position: relative;
    border-radius: 24px;
}

.service-image-wrapper::before {
    content: '';
    position: absolute;
    top: -24px;
    left: -24px;
    width: 100%;
    height: 100%;
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 50%, transparent);
    border-radius: 24px;
    z-index: 0;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-row.reverse .service-image-wrapper::before {
    left: auto;
    right: -24px;
}

.service-image-wrapper:hover::before {
    transform: translate(12px, 12px);
    border-color: var(--theme-palette-color-1, #7b866e);
    background-color: color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 3%, transparent);
}

.service-row.reverse .service-image-wrapper:hover::before {
    transform: translate(-12px, 12px);
}

.service-image {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(9, 9, 9, 0.04), 0 4px 8px rgba(9, 9, 9, 0.02);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-image-wrapper:hover .service-image {
    transform: scale(1.03);
}

.service-content {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-title {
    font-size: clamp(1.5rem, 2vw, 2rem);
    color: var(--theme-palette-color-3, #090909);
    margin: 0 0 1.5rem 0;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.service-description {
    font-size: 1.15rem;
    color: var(--theme-palette-color-4, #1d1d1b);
    line-height: 1.8;
    margin: 0 0 2.5rem 0;
    font-weight: 400;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
    display: grid;
    gap: 1rem;
}

.service-list li {
    position: relative;
    padding-left: 2.25rem;
    color: var(--theme-palette-color-3, #090909);
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C2A25D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Elegant Service Link Button */
.service-link {
    display: inline-flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--theme-palette-color-1, #7b866e);
    text-decoration: none;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 20%, transparent);
    transition: all 0.3s ease;
    align-self: flex-start;
}

.service-link svg {
    width: 20px;
    height: 20px;
    margin-left: 0.75rem;
    transition: transform 0.3s ease;
}

.service-link:hover {
    color: var(--theme-palette-color-2, #C2A25D);
    border-bottom-color: var(--theme-palette-color-2, #C2A25D);
}

.service-link:hover svg {
    transform: translateX(8px);
}

/* * ==========================================
         * ANIMATED BACKGROUND ITEMS
         * ==========================================
         */
.anim-item {
    position: absolute;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 6%, transparent), color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 2%, transparent));
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 12%, transparent);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    z-index: 1;
    pointer-events: none;
}

/* Hero Animations */
.anim-board-1 {
    width: 300px;
    height: 200px;
    top: 10%;
    left: -5%;
    transform: rotate(-15deg);
    animation: float 8s ease-in-out infinite;
}

.anim-board-2 {
    width: 400px;
    height: 250px;
    bottom: -5%;
    right: -10%;
    transform: rotate(25deg);
    animation: float 10s ease-in-out infinite reverse;
}

.anim-cut-line {
    position: absolute;
    width: 1px;
    height: 100vh;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 15%, transparent), transparent);
    top: 0;
    z-index: 0;
    pointer-events: none;
}

.line-1 {
    left: 20%;
    animation: scanline 6s linear infinite;
}

.line-2 {
    right: 25%;
    animation: scanline 8s linear infinite reverse;
}

/* Services Animations */
.anim-shape-1 {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    top: 10%;
    right: -15%;
    opacity: 0.5;
    animation: float 15s ease-in-out infinite;
}

.anim-shape-2 {
    width: 400px;
    height: 400px;
    bottom: 15%;
    left: -10%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.4;
    animation: float 18s ease-in-out infinite reverse;
}

/* * ==========================================
         * KEYFRAMES & RESPONSIVE
         * ==========================================
         */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-25px) rotate(3deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

@media (max-width: 992px) {

    .service-row,
    .service-row.reverse {
        flex-direction: column;
        gap: 2.5rem;
        margin-bottom: 8rem;
    }

    .service-image-wrapper,
    .service-content {
        width: 100%;
    }

    .service-row.reverse .service-image-wrapper::before,
    .service-image-wrapper::before {
        left: 10px;
        right: 10px;
        top: 10px;
        bottom: -10px;
        height: auto;
    }
}

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

    .hero-title {
        font-size: 1.75rem;
    }

    .btn-primary {
        width: 100%;
        margin-bottom: 1rem;
    }

    .anim-board-1,
    .anim-board-2,
    .anim-shape-1,
    .anim-shape-2 {
        opacity: 0.15;
    }

    .edgecraft-services {
        padding: 5rem 1.5rem;
    }

    .service-title {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 2.5rem;
    }
}




/* * ==========================================
 * CUTTING PLAN OPTIMIZER SECTION
 * ==========================================
 */
.edgecraft-optimizer {
    position: relative;
    padding: 5rem 2rem;
    background-color: var(--theme-palette-color-7, #f8f9fb);
    overflow: hidden;
    width: 100% !important;
    max-width: 100vw;
}

.optimizer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 6rem;
    position: relative;
    z-index: 2;
}

.optimizer-content {
    flex: 1;
}

.optimizer-content .section-title {
    margin-bottom: 1.5rem;
}

.optimizer-description {
    font-size: 1.15rem;
    color: var(--theme-palette-color-4, #1d1d1b);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.optimizer-features {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.optimizer-features li {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.opt-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background-color: var(--theme-palette-color-8, #ffffff);
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 15%, transparent);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-palette-color-1, #7b866e);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.optimizer-features li:hover .opt-icon {
    transform: translateY(-3px);
    border-color: var(--theme-palette-color-2, #C2A25D);
    color: var(--theme-palette-color-2, #C2A25D);
}

.opt-icon svg {
    width: 24px;
    height: 24px;
}

.optimizer-features li span {
    font-size: 1.05rem;
    color: var(--theme-palette-color-4, #1d1d1b);
    line-height: 1.5;
    padding-top: 0.5rem;
}

.optimizer-features li strong {
    color: var(--theme-palette-color-3, #090909);
    display: block;
    margin-bottom: 0.2rem;
}

.optimizer-media {
    flex: 1.1;
    position: relative;
    perspective: 1000px;
}

.opt-browser-frame {
    background: var(--theme-palette-color-8, #ffffff);
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-3, #090909) 10%, transparent);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1), 0 0 0 10px color-mix(in srgb, var(--theme-palette-color-8, #ffffff) 50%, transparent);
    overflow: hidden;
    position: relative;
    transform: rotateY(-5deg) rotateX(2deg);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.optimizer-media:hover .opt-browser-frame {
    transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

.opt-browser-header {
    height: 40px;
    background: color-mix(in srgb, var(--theme-palette-color-7, #f8f9fb) 80%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--theme-palette-color-3, #090909) 5%, transparent);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 8px;
}

.opt-browser-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

a.btn-primary.btn-cp {
    background: var(--theme-palette-color-1, #7b866e);
}

.dot.close {
    background-color: #ff5f56;
}

.dot.min {
    background-color: #ffbd2e;
}

.dot.max {
    background-color: #27c93f;
}

.opt-video {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
    background-color: var(--theme-palette-color-7, #f8f9fb);
    /* Poster backup */
}

/* Floating Card inside the media area */
.opt-floating-card {
    position: absolute;
    bottom: -20px;
    left: -30px;
    background: var(--theme-palette-color-8, #ffffff);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 15%, transparent);
    animation: float 6s ease-in-out infinite;
}

.opt-float-icon {
    width: 40px;
    height: 40px;
    background: var(--theme-palette-color-1, #7b866e);
    color: var(--theme-palette-color-8, #ffffff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-float-icon svg {
    width: 20px;
    height: 20px;
}

.opt-float-text strong {
    display: block;
    color: var(--theme-palette-color-3, #090909);
    font-size: 0.95rem;
}

.opt-float-text span {
    color: var(--theme-palette-color-4, #1d1d1b);
    font-size: 0.85rem;
}

/* Optimizer specific background animations */
.opt-shape-1 {
    width: 800px;
    height: 800px;
    border-radius: 50%;
    top: -20%;
    left: -20%;
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.opt-shape-2 {
    width: 500px;
    height: 500px;
    bottom: -10%;
    right: -10%;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.4;
    animation: float 15s ease-in-out infinite reverse;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 8%, transparent), transparent);
}

/* Responsive */
@media (max-width: 992px) {
    .optimizer-container {
        flex-direction: column;
        gap: 4rem;
    }

    .opt-browser-frame {
        transform: none;
    }

    .opt-floating-card {
        bottom: 20px;
        left: 20px;
    }
}

@media (max-width: 768px) {
    .edgecraft-optimizer {
        padding: 5rem 1.5rem;
    }

    .optimizer-features li {
        flex-direction: column;
        gap: 0.75rem;
    }

    .opt-floating-card {
        display: none;
        /* Hide on very small screens to prevent video cutoff */
    }
}


/* --- Video Play Overlay --- */

.opt-browser-frame a {
    position: relative;
    display: block;
    cursor: pointer;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8); /* Centered and slightly smaller by default */
    width: 68px;
    height: 48px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none; /* Ensures the click still hits the link anchor */
    z-index: 5;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* Show and scale up on hover */
.opt-browser-frame:hover .video-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Responsive adjustment for small screens */
@media (max-width: 768px) {
    .video-play-btn {
        opacity: 0.9; /* Keep partially visible on mobile where there is no hover */
        transform: translate(-50%, -50%) scale(0.9);
    }
}


/* * ==========================================
 * HOW IT WORKS SECTION (UPGRADED)
 * ==========================================
 */
.edgecraft-how-it-works {
    position: relative;
    padding: 5rem 2rem;
    background-color: var(--theme-palette-color-8, #ffffff);
    overflow: hidden;
    width: 100% !important;
    max-width: 100vw;
}

.hiw-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hiw-subtitle-desc {
    color: var(--theme-palette-color-4, #1d1d1b);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 1rem auto 0;
    line-height: 1.6;
}

.hiw-steps-wrapper {
    position: relative;
    margin-top: 4rem;
}

/* The Animated Connecting Timeline */
.hiw-connecting-line {
    position: absolute;
    top: 50px;
    /* Align with the top of the cards */
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 40%, transparent), transparent);
    z-index: 0;
    background-size: 200% 100%;
    animation: flowLine 4s linear infinite;
}

@keyframes flowLine {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.hiw-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hiw-step {
    background: color-mix(in srgb, var(--theme-palette-color-8, #ffffff) 80%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 15%, transparent);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;

    /* Starting state for JS scroll reveal (staggered) */
    opacity: 0;
    transform: translateY(40px);
}

.reveal-on-scroll.is-visible .hiw-step.step-1 {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible .hiw-step.step-2 {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible .hiw-step.step-3 {
    transition-delay: 0.5s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible .hiw-step.step-4 {
    transition-delay: 0.7s;
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hiw-step:hover {
    transform: translateY(-4px) !important;
    border-color: var(--theme-palette-color-2, #C2A25D);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

/* Subtle corner gradient on hover */
.hiw-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 5%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.hiw-step:hover::before {
    opacity: 1;
}

.hiw-step-number {
    position: absolute;
    top: -15px;
    right: -10px;
    font-size: 6rem;
    font-weight: 900;
    color: color-mix(in srgb, var(--theme-palette-color-7, #f8f9fb) 80%, transparent);
    z-index: 0;
    transition: color 0.4s ease;
    user-select: none;
}

.hiw-step:hover .hiw-step-number {
    color: color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 10%, transparent);
}

.hiw-step-icon {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    background-color: var(--theme-palette-color-8, #ffffff);
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 20%, transparent);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-palette-color-1, #7b866e);
    z-index: 1;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.hiw-step:hover .hiw-step-icon {
    background-color: var(--theme-palette-color-1, #7b866e);
    color: var(--theme-palette-color-8, #ffffff);
    transform: scale(1.1) rotate(5deg);
}

.hiw-step-icon svg {
    width: 32px;
    height: 32px;
}


.hiw-step:hover .hiw-step-icon svg,
.hiw-step:hover .hiw-step-icon svg path {
    fill: var(--theme-palette-color-8, #ffffff) !important;
}

.hiw-step h3 {
    position: relative;
    font-size: 1.35rem;
    color: var(--theme-palette-color-3, #090909);
    margin: 0 0 1rem 0;
    z-index: 1;
    font-weight: 600;
}

.hiw-step p {
    position: relative;
    font-size: 1rem;
    color: var(--theme-palette-color-4, #1d1d1b);
    line-height: 1.6;
    margin: 0;
    z-index: 1;
}

/* Background Animations */
.hiw-shape-1 {
    width: 700px;
    height: 700px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    top: -20%;
    right: -15%;
    opacity: 0.2;
    animation: float 25s ease-in-out infinite;
}

.hiw-shape-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    bottom: -10%;
    left: -10%;
    opacity: 0.3;
    animation: float 20s ease-in-out infinite reverse;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 10%, transparent), transparent);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hiw-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .hiw-connecting-line {
        display: none;
        /* Hide timeline on stacked views */
    }

    /* Adjust reveal delay for 2-column layout */
    .reveal-on-scroll.is-visible .hiw-step.step-3 {
        transition-delay: 0.1s;
    }

    .reveal-on-scroll.is-visible .hiw-step.step-4 {
        transition-delay: 0.3s;
    }
}

@media (max-width: 768px) {
    .edgecraft-optimizer {
        padding: 5rem 1.5rem;
    }

    .optimizer-features li {
        flex-direction: column;
        gap: 0.75rem;
    }

    .opt-floating-card {
        display: none;
        /* Hide on very small screens to prevent video cutoff */
    }
}

/* * ==========================================
 * HOW IT WORKS SECTION (UPGRADED)
 * ==========================================
 */
.edgecraft-how-it-works {
    position: relative;
    padding: 8rem 2rem;
    background-color: var(--theme-palette-color-8, #ffffff);
    overflow: hidden;
    width: 100% !important;
    max-width: 100vw;
}

.hiw-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hiw-subtitle-desc {
    color: var(--theme-palette-color-4, #1d1d1b);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 1rem auto 0;
    line-height: 1.6;
}

.hiw-steps-wrapper {
    position: relative;
    margin-top: 4rem;
}

/* The Animated Connecting Timeline */
.hiw-connecting-line {
    position: absolute;
    top: 50px;
    /* Align with the top of the cards */
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 40%, transparent), transparent);
    z-index: 0;
    background-size: 200% 100%;
    animation: flowLine 4s linear infinite;
}

@keyframes flowLine {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.hiw-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hiw-step {
    background: color-mix(in srgb, var(--theme-palette-color-8, #ffffff) 80%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 15%, transparent);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;

    /* Starting state for JS scroll reveal (staggered) */
    opacity: 0;
    transform: translateY(40px);
}

.reveal-on-scroll.is-visible .hiw-step.step-1 {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible .hiw-step.step-2 {
    transition-delay: 0.3s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible .hiw-step.step-3 {
    transition-delay: 0.5s;
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible .hiw-step.step-4 {
    transition-delay: 0.7s;
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hiw-step:hover {
    transform: translateY(-10px) !important;
    border-color: var(--theme-palette-color-2, #C2A25D);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

/* Subtle corner gradient on hover */
.hiw-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 5%, transparent), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.hiw-step:hover::before {
    opacity: 1;
}

.hiw-step-number {
    position: absolute;
    top: -15px;
    right: -10px;
    font-size: 6rem;
    font-weight: 900;
    color: color-mix(in srgb, var(--theme-palette-color-7, #f8f9fb) 80%, transparent);
    z-index: 0;
    transition: color 0.4s ease;
    user-select: none;
}

.hiw-step:hover .hiw-step-number {
    color: color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 10%, transparent);
}

.hiw-step-icon {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    background-color: var(--theme-palette-color-8, #ffffff);
    border: 1px solid color-mix(in srgb, var(--theme-palette-color-1, #7b866e) 20%, transparent);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-palette-color-1, #7b866e);
    z-index: 1;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.hiw-step:hover .hiw-step-icon {
    background-color: var(--theme-palette-color-1, #7b866e);
    color: var(--theme-palette-color-8, #ffffff);
    transform: scale(1.1) rotate(5deg);
}

.hiw-step-icon svg {
    width: 32px;
    height: 32px;
}

.hiw-step h3 {
    position: relative;
    font-size: 1.35rem;
    color: var(--theme-palette-color-3, #090909);
    margin: 0 0 1rem 0;
    z-index: 1;
    font-weight: 600;
}

.hiw-step p {
    position: relative;
    font-size: 1rem;
    color: var(--theme-palette-color-4, #1d1d1b);
    line-height: 1.6;
    margin: 0;
    z-index: 1;
}

/* Background Animations */
.hiw-shape-1 {
    width: 700px;
    height: 700px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    top: -20%;
    right: -15%;
    opacity: 0.2;
    animation: float 25s ease-in-out infinite;
}

.hiw-shape-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    bottom: -10%;
    left: -10%;
    opacity: 0.3;
    animation: float 20s ease-in-out infinite reverse;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-palette-color-2, #C2A25D) 10%, transparent), transparent);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .hiw-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .hiw-connecting-line {
        display: none;
        /* Hide timeline on stacked views */
    }

    /* Adjust reveal delay for 2-column layout */
    .reveal-on-scroll.is-visible .hiw-step.step-3 {
        transition-delay: 0.1s;
    }

    .reveal-on-scroll.is-visible .hiw-step.step-4 {
        transition-delay: 0.3s;
    }
}

@media (max-width: 768px) {
    .edgecraft-how-it-works {
        padding: 5rem 1.5rem;
    }

    .hiw-steps {
        grid-template-columns: 1fr;
    }

    /* Reset delays for single column so they just appear as you scroll */
    .reveal-on-scroll.is-visible .hiw-step {
        transition-delay: 0s !important;
    }
}