/* ==========================================
   How It Works Page
   ========================================== */

/* Hero */
.hiw-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 0 40px;
    box-sizing: border-box;
    overflow: visible;
    text-align: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#hiw-diag-placeholder {
    margin-top: 60px;
}

.hiw-hero-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 2;
}

.hiw-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(61, 194, 105, 0.1);
    border: 1px solid rgba(61, 194, 105, 0.2);
    border-radius: 50px;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.hiw-mobile-hero {
    display: none;
    overflow: hidden;
    padding: 2rem 0;
}

.hiw-mobile-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}


.hiw-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hiw-hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-inline: auto;
    line-height: 1.6;
    opacity: 0.85;
}

/* Removed legacy How It Works styles */
/* â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â"      How It Works â¬  Hero Diagram (Full Width)     â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â" â"  */
#hiw-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
    font-weight: 700;
}

.hiw-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}


/* Full-viewport outer wrapper */
.hiw-diag-outer {
    display: flex;
    align-items: center;
    /* Natural vertical symmetry */
    justify-content: center;
    width: 100%;
    /* Balance top/bottom padding to center content while allowing for heads */
    padding: 3.5rem 2vw 1.5rem;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    gap: 0;
}

/* --- Linked Heading Technique --- */
.hiw-column-linked {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 240px;
    height: 72px;
    /* Reduced from 75px */
    font-size: 0;
    /* Kill inline whitespace */
    line-height: 0;
}

.hiw-cap {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    color: rgba(61, 194, 105, 0.5);
    text-align: left !important;
    /* Force override of hero-level centering */
    line-height: 1;
    position: absolute;
    bottom: calc(100% + 1.25rem);
    left: 0;
    width: 100%;
    white-space: nowrap;
    pointer-events: none;
}

/* App mockup heading link */
.hiw-linked-app-cap {
    position: absolute;
    bottom: calc(100% + 1.25rem);
    left: 0;
    width: 200px;
    /* Match phone width */
}

/* â ¬ â ¬ Diagram grid â ¬ â ¬ */
.hiw-diagram-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 0 0 auto;
    min-width: 0;
    /* Add bottom padding so captions below sensors don't get clipped */
    padding-bottom: 0.2rem;

}

/* Outer row: unitbox + bt-line side by side */
.hiw-outer-row {
    display: flex;
    align-items: center;
    gap: 6px;

}

/* â ¬ â ¬ Dotted unit box wrapping equipment + sensor + module â ¬ â ¬ */
/* --- Unified Pill Component --- */
.hiw-pill {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(61, 194, 105, 0.2);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    width: 240px;
    height: 72px;
    /* Reduced from 75px */
    box-sizing: border-box;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 2;
    font-size: initial;
    /* Restore font size */
    line-height: normal;
}

.hiw-pill:hover {
    background: rgba(61, 194, 105, 0.08);
    border-color: rgba(61, 194, 105, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.pill-image-slot {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pill-image-slot img {
    width: 95%;
    height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(61, 194, 105, 0.2));
}

.pill-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    /* Increased from 0.15rem */
    min-width: 0;
    text-align: left;
}

.pill-headline {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.pill-subtext {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* --- Diagram Containers --- */
.hiw-unit-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    position: relative;
    flex-shrink: 0;
    font-size: 0;
    line-height: 0;
}




/* â ¬ â ¬ Tight arrow â ¬ â ¬ */
.diag-tight-arrow {
    font-size: 1.4rem;
    color: rgba(61, 194, 105, 0.5);
    flex-shrink: 0;
    line-height: 1;

}

/* â ¬ â ¬ Sensor wrap: pill + caption below (caption is absolute so layout is unaffected) â ¬ â ¬ */
.diag-sensor-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    /* prevent stretching */
}



/* Positioned absolutely so it doesn't push other row items */

/* â ¬ â ¬ Solid connector (sensor â  module) â ¬ â ¬ */

/* â ¬ â ¬ MG-TM Module â¬  compact fixed-width rectangle â ¬ â ¬ */

/* â ¬ â ¬ Animated line to phone â ¬ â ¬ */
.diag-bt-line {
    flex: 0 0 80px;
    /* Constraints the width to bring phone closer */
    min-width: 40px;
    height: 1px;
    position: relative;
    align-self: center;
    background: linear-gradient(90deg, rgba(61, 194, 105, 0.6) 0%, rgba(61, 194, 105, 0.2) 80%, transparent 100%);
    overflow: visible;

}

/* The animated signal pulse */
.diag-bt-line::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 50%;
    filter: blur(1px);
    animation: signalPulse 3s infinite linear;
    opacity: 0.8;

}

.diag-bt-line::after {
    display: none;
    /* Entirely hide the bluetooth icon and its background */
}

@keyframes signalPulse {
    0% {
        left: -10%;
        opacity: 0;

    }

    30% {
        opacity: 1;

    }

    70% {
        opacity: 1;

    }

    100% {
        left: 110%;
        opacity: 0;

    }


}

/* --- App image column --- */
.hiw-app-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex: 0 0 auto;
    margin-top: 0;
    /* Natural centering restored */
}

.hiw-app-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(61, 194, 105, 0.12) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;

}

.hiw-phone-container {
    position: relative;
    width: 200px;
    /* Base width for desktop */
    background: #000;
    border-radius: 28px;
    padding: 6px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 6px #1F1F1F;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 10;
}

.hiw-phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    object-fit: cover;
    display: block;
}

.hiw-phone-frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    pointer-events: none;
}

.hiw-app-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;

}

/* â ¬ â ¬ Intro Section Redesign â ¬ â ¬ */
.hiw-intro {
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    padding-block: 5rem;
    background: radial-gradient(circle at 70% 50%, rgba(61, 194, 105, 0.05) 0%, transparent 50%);

}

.hiw-intro-container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 2rem;

}

.hiw-intro-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .hiw-intro-grid {
        display: flex !important;
        flex-direction: column;
        text-align: left;
    }

    .hiw-intro .hiw-intro-grid .hiw-intro-media {
        order: -1 !important;
        /* Force image above text */
        margin-top: 2rem;
        margin-bottom: 3rem;
        transform: scale(1.3);
        /* Significantly increase intro image size */
        transform-origin: center;
    }

    .hiw-intro .hiw-intro-grid .hiw-intro-content {
        order: 2 !important;
    }

    .hiw-intro-content h3 {
        font-size: 1.75rem;
        margin-bottom: 1.2rem;
    }

    .hiw-intro-content p {
        font-size: 1.05rem;
    }
}

.hiw-intro-content {
    text-align: left !important;
}

.hiw-intro-content h3 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    line-height: 1.2;
    text-align: left !important;
}

.hiw-intro-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: left;
}

.hiw-intro-content p:last-child {
    margin-bottom: 0;

}

.hiw-intro-media img {
    width: 100%;
    max-width: 1000px;
    /*border-radius: 2rem;*/
    /*box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);*/

}

/* ✦ ✦ Snap Step Sections ✦ ✦ */
.hiw-step-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    padding-block: 5rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hiw-step-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);

}

.hiw-step-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
    margin-top: 3rem;
}

.hiw-step-section:nth-child(even) .hiw-step-layout {
    grid-template-columns: 0.8fr 1.2fr;

}

.hiw-step-section:nth-child(even) .hiw-step-image {
    order: 2;

}

.hiw-step-image {
    position: relative;
}

.hiw-step-image img {
    width: 100%;
    display: block;
}



.hiw-step-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.hiw-step-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;

}



/* â ¬ â ¬ Snap Transitions â ¬ â ¬ */
.revealed .hiw-step-content {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;

}

.revealed .hiw-step-image {
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;

}

.hiw-step-section:nth-child(even).revealed .hiw-step-image {
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;

}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);

    }

    to {
        opacity: 1;
        transform: translateY(0);

    }


}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);

    }

    to {
        opacity: 1;
        transform: translateX(0);

    }


}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);

    }

    to {
        opacity: 1;
        transform: translateX(0);

    }


}

/* â ¬ â ¬ Responsive â ¬ â ¬ */
@media (max-width: 900px) {
    #hiw-diag-placeholder {
        display: none !important;
    }

    .hiw-hero {
        display: none !important;
    }

    .hiw-mobile-hero {
        display: none !important;
    }

    .hiw-mobile-img {
        transform: scale(1.6);
        /* scales up the image to remove black padding */
        transform-origin: center center;
    }

    .hiw-diag-outer {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hiw-mobile-hero {
        margin-top: 0;
    }

    .hiw-mobile-img {
        transform: scale(1.8);
        /* Scale slightly closer on smaller screens */
    }
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   How It Works â€” Hero Diagram (Full Width)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.hiw-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 0 60px;
    box-sizing: border-box;
    overflow: visible;
    text-align: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.hiw-mobile-hero {
    display: none;
    overflow: hidden;
    padding: 2rem 0;
}

@media (max-width: 900px) {
    .hiw-hero {
        display: none !important;
    }

    .hiw-mobile-hero {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hiw-mobile-hero {
        margin-top: 0;
    }
}

/* Cleaned up redundant hero/mobile blocks */

.hiw-mobile-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

#hiw-diag-placeholder {
    margin-top: 60px;
    /* Direct nudge to push diagram down */
}

.hiw-hero-content {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.hiw-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(61, 194, 105, 0.1);
    border: 1px solid rgba(61, 194, 105, 0.2);
    border-radius: 50px;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

#hiw-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
    font-weight: 700;
}

.hiw-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Full-viewport outer wrapper */
.hiw-diag-outer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 4vw;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
    gap: 0;
    transform: scale(0.90);
    transform-origin: center top;
}

/* â”€â”€ Column Captions â”€â”€ */
.hiw-captions {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    width: max-content;
    pointer-events: none;
}

.hiw-cap {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    line-height: 1.2;
}

/* Mirrored box for label alignment */
.hiw-cap-unit-box-mirror {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 0 20px;
    /* match box horizontal padding */
    flex-shrink: 0;
    border: none;
    background: none;
}

.hiw-cap-equip {
    width: 240px;
    /* Match equipment column width */
    flex-shrink: 0;
}

.hiw-cap-sensor {
    width: 240px;
    /* Match sensor column width */
    flex-shrink: 0;
}

.hiw-cap-module {
    width: 240px;
    /* Match module column width */
    flex-shrink: 0;
}

.hiw-cap-wireless {
    width: 175px;
    /* match app image width */
    text-align: center;
    flex-shrink: 0;
}

/* â”€â”€ Diagram grid â”€â”€ */
.hiw-diagram-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 0 0 auto;
    min-width: 0;
    /* Removed extra bottom padding to maintain vertical symmetry */
    padding-bottom: 0;
}

/* Outer row: unitbox + bt-line side by side */
.hiw-outer-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* â”€â”€ Dotted unit box wrapping equipment + sensor + module â”€â”€ */
.hiw-unit-box {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 14px 16px;
    /* Symmetric padding ensures natural vertical centering */
    /* extra bottom for sensor captions handled by symmetric padding */
    position: relative;
    flex-shrink: 0;
}

.diag-equip-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(61, 194, 105, 0.3);
    border-left: 2px solid rgba(61, 194, 105, 0.7);
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    /* Reduced padding */
    width: 180px;
    /* Reduced from 220px */
    flex-shrink: 0;
    align-self: center;
    /* prevent stretching */
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 16px rgba(61, 194, 105, 0.05);
}

.diag-equip-box:hover {
    border-color: rgba(61, 194, 105, 0.65);
    background: rgba(61, 194, 105, 0.07);
    box-shadow: 0 0 24px rgba(61, 194, 105, 0.15);
}

.diag-equip-icon {
    font-size: 1.2rem;
    /* Reduced from 1.35rem */
    color: var(--accent-color);
    flex-shrink: 0;
}

.diag-equip-label {
    font-size: 0.78rem;
    /* Reduced from 0.82rem */
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* â”€â”€ Tight arrow â”€â”€ */
.diag-tight-arrow {
    font-size: 1.4rem;
    color: rgba(61, 194, 105, 0.5);
    flex-shrink: 0;
    line-height: 1;
}

/* â”€â”€ Sensor wrap: pill + caption below (caption is absolute so layout is unaffected) â”€â”€ */
.diag-sensor-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    /* prevent stretching */
}

.diag-sensor-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 194, 105, 0.07);
    border: 1px solid rgba(61, 194, 105, 0.3);
    border-radius: 8px;
    padding: 0 0.9rem;
    width: 150px;
    /* Reduced from 160px */
    height: 32px !important;
    /* Reduced from 42px */
    /* Fixed height to match module */
    flex-shrink: 0;
    transition: all 0.3s;
}

.diag-sensor-pill:hover {
    background: rgba(61, 194, 105, 0.14);
    border-color: rgba(61, 194, 105, 0.55);
}

.diag-sensor-name {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--accent-color);
    font-family: monospace;
    letter-spacing: 0.04em;
}

/* Positioned absolutely so it doesn't push other row items */
.diag-sensor-caption {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.56rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* â”€â”€ Solid connector (sensor â†’ module) â”€â”€ */
.diag-dotted-conn {
    flex: 0 0 28px;
    height: 1px;
    background: rgba(61, 194, 105, 0.5);
    flex-shrink: 0;
    align-self: center;
}

/* â”€â”€ MG-TM Module â€” compact fixed-width rectangle â”€â”€ */
.diag-module-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center !important;
    /* prevent stretching */
    height: 32px !important;
    /* Reduced from 42px */
    /* Force wrapper height to match rect */
}

.diag-module-rect {
    display: flex;
    align-items: center;
    /* center items vertically */
    flex: 0 0 170px;
    width: 170px;
    height: 32px !important;
    /* Reduced from 42px */
    /* Exact match to sensor height */
    max-height: 34px !important;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(61, 194, 105, 0.5);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 18px rgba(61, 194, 105, 0.1);
    transition: all 0.3s;
}

.diag-module-rect:hover {
    border-color: rgba(61, 194, 105, 0.8);
    box-shadow: 0 0 28px rgba(61, 194, 105, 0.2);
}

/* Left: thermometer + code */
.diag-module-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.8rem;
    flex: 1;
    height: 100%;
    /* Fill the 42px parent */
}

.diag-module-therm {
    font-size: 1.1rem;
    color: var(--accent-color);
    flex-shrink: 0;
    line-height: 1;
}

.diag-module-code {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: monospace;
    letter-spacing: 0.05em;
    line-height: 1;
}

/* Right: Bluetooth */
.diag-module-bt {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 194, 105, 0.15);
    border-left: 1px solid rgba(61, 194, 105, 0.3);
    padding: 0 0.7rem;
    flex-shrink: 0;
    height: 100%;
    /* Fill the 42px parent */
}

.diag-bt-icon {
    font-size: 1.2rem;
    color: var(--accent-color);
    filter: drop-shadow(0 0 6px rgba(61, 194, 105, 0.6));
    line-height: 1;
}

.diag-module-caption {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.56rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* â”€â”€ Animated line to phone â”€â”€ */
.diag-bt-line {
    flex: 0 0 80px;
    /* Constraints the width to bring phone closer */
    min-width: 40px;
    height: 1px;
    position: relative;
    align-self: center;
    background: linear-gradient(90deg,
            rgba(61, 194, 105, 0.6) 0%,
            rgba(61, 194, 105, 0.2) 80%,
            transparent 100%);
    overflow: visible;
}

/* The animated signal pulse */
.diag-bt-line::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 50%;
    filter: blur(1px);
    animation: signalPulse 3s infinite linear;
    opacity: 0.8;
}

.diag-bt-line::after {
    content: "\e1a7";
    /* Material Symbols: bluetooth */
    font-family: 'Material Symbols Rounded';
    font-size: 0.8rem;
    color: var(--accent-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    /* Flat black background */
    padding: 0 6px;
    line-height: 1;
    opacity: 0.6;
}

@keyframes signalPulse {
    0% {
        left: -10%;
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        left: 110%;
        opacity: 0;
    }
}

/* â”€â”€ App image column â”€â”€ */
.hiw-app-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex: 0 0 auto;
    /* Stop drifting */
    margin-left: 0;
    /* Remove offset */
    margin-top: 0;
    /* Natural centering restored via symmetric row padding */
}

.hiw-app-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(61, 194, 105, 0.12) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

/* Unified phone styles moved above */

/* â”€â”€ Snap Step Sections â”€â”€ */
.hiw-step-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    padding-block: 6rem;
    position: relative;
    border-bottom: none;
}



.hiw-step-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.hiw-step-section:nth-child(even) .hiw-step-layout {
    grid-template-columns: 1.2fr 1fr;
}

.hiw-step-section:nth-child(even) .hiw-step-image {
    order: 2;
}

.hiw-step-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.hiw-step-image .hiw-phone-container {
    width: 180px;
    /* Fixed smaller width for steps */
    padding: 6px;
    background: #000;
    border-radius: 28px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 0 6px #1F1F1F;
    overflow: hidden;
}

.hiw-step-image .hiw-phone-container img {
    width: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 22px;
    object-fit: cover;
    object-position: center;
}

.hiw-step-image .hiw-phone-frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 28px;
    pointer-events: none;
}


.hiw-step-content h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--accent-color);
}

.hiw-step-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}



/* â”€â”€ Snap Transitions â”€â”€ */
.revealed .hiw-step-content {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.revealed .hiw-step-image {
    animation: fadeInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hiw-step-section:nth-child(even).revealed .hiw-step-image {
    animation: fadeInLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 900px) {
    .hiw-diag-outer {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1.5rem;
    }

    .hiw-captions {
        display: none;
    }

    .hiw-unit-box {
        flex-wrap: wrap;
        padding: 10px;
    }

    .diag-equip-box {
        width: 150px;
    }

    .diag-bt-line {
        display: none;
    }

    .hiw-app-col {
        align-self: center;
        margin-left: 0;
    }

    .hiw-phone-container {
        width: 150px;
        border-radius: 24px;
        padding: 5px;
    }
}

/* â”€â”€ How It Works Steps Layout â”€â”€ */
.hiw-steps-container {
    padding: 0 0 6rem;
    /* Removed top 2rem — it showed as dead space when first step snapped */
}

.hiw-step-section {
    padding: 3rem 0;
}


.hiw-step-text ul {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.hiw-step-text li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Consolidated Mobile Styles for How It Works */
@media (max-width: 992px) {
    html.snap-scroll-html {
        scroll-snap-type: none;
    }

    .hiw-steps-container {
        padding: 0;
        /* Removed bottom padding entirely to prevent compounding space */
    }

    .hiw-steps-container .hiw-step-section {
        min-height: auto;
        scroll-snap-align: none;
        padding-block: 2.5rem;
        /* Reduced spacing between mobile steps */
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* Add subtle divider to visually separate steps */
    }

    .hiw-steps-container .hiw-step-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
        /* Remove padding entirely at the end of the steps list to prevent gap */
    }

    .hiw-steps-container .hiw-step-layout,
    .hiw-steps-container .hiw-step-section:nth-child(even) .hiw-step-layout {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        /* Tighter internal flow */
        text-align: left;
        /* Restored left alignment */
        padding-inline: 1rem;
        /* Added horizontal padding */
    }

    .hiw-steps-container .hiw-step-content {
        order: 2;
        width: 100%;
        text-align: left;
        /* Restored left alignment */
    }

    .hiw-steps-container .hiw-step-image,
    .hiw-steps-container .hiw-step-section:nth-child(even) .hiw-step-image {
        order: 1;
        width: 100%;
        max-width: 320px;
        margin-inline: auto;
        /* Centered instead of 0 */
    }

    /* Override the fixed 180px width so it scales up on mobile */
    .hiw-steps-container .hiw-step-image .hiw-phone-container {
        width: 250px;
    }

    .hiw-steps-container .hiw-step-content h2 {
        font-size: 1.5rem;
        /* Decreased font size for mobile */
        margin-bottom: 1.25rem;
        /* Slightly reduced margin to match smaller text */
        text-align: left;
    }

    .hiw-steps-container .hiw-step-content p {
        font-size: 1rem;
        text-align: left;
    }

    .hiw-steps-container .hiw-step-content ul {
        padding-left: 1.2rem;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }

    .hiw-steps-container .hiw-step-content li {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        list-style: disc;
    }
}