/* =========================================================
   SHOPIFY DEVELOPMENT PROCESS SECTION (.sdp-process)
   Figma: Frame 5 — Left-pinned heading, right-scrolling 6-step timeline
   1920px baseline → proportional fluid clamp down to 1280px
   Tablet (769–1024px): definite values, 1-col stacked
   Mobile (≤ 768px): definite values, 1-col stacked
   ========================================================= */

/* ──────────────────────────────────────────
   SECTION WRAPPER
   Supplied wave SVG over the page's black background
   ────────────────────────────────────────── */
.sdp-process {
    position: relative;
    width: 100%;
    background-color: #000000;
    background-image: url('../img/shopify-development-process-background.svg');
    background-attachment: fixed;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    /* overflow: hidden breaks position: sticky — use clip instead */
    overflow: clip;
}

.sdp-process__container {
    width: 100%;
    max-width: 79.0625rem;
    margin-inline: auto;
    padding-inline: 1.25rem;
    box-sizing: border-box;
}

/* ──────────────────────────────────────────
   STAGE (flex row: left | right)
   Desktop: left half is sticky, right half scrolls naturally
   Container handles max-width & centering.
   ────────────────────────────────────────── */
.sdp-process__stage {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding-block: clamp(4.166688rem, 5.2083vw, 6.25rem);
    box-sizing: border-box;
}

/* ──────────────────────────────────────────
   LEFT PANEL — Sticky / Pinned
   ────────────────────────────────────────── */
.sdp-process__left {
    position: sticky;
    /* Stick just below the fixed site header (~80px) */
    top: 5rem;
    align-self: flex-start;

    /* Figma: left panel ~51% of 1920px frame = ~975px, but we use proportion */
    flex: 0 0 42%;
    max-width: 42%;
    box-sizing: border-box;

    /* Vertical centering: viewport height minus header */
    height: calc(100vh - 5rem);
    display: flex;
    align-items: center;
}

.sdp-process__left-inner {
    position: relative;
    z-index: 1;
    max-width: clamp(26.25rem, 32.8125vw, 39.375rem);
}

/* Title: "Our Shopify Development Process"
   Figma: 54px / DM Sans 500 / line-height 64px */
.sdp-process__title {
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(2.25rem, calc(2.8125vw * var(--desktop-font-vw-scale, 1)), 3.375rem);
    line-height: clamp(2.666688rem, 3.3333vw, 4rem);
    color: #ffffff;
    margin: 0 0 clamp(0.916687rem, 1.1458vw, 1.375rem) 0;
    letter-spacing: -0.01em;
}

/* Subtitle: Figma 20px / weight 500 / opacity 0.6 */
.sdp-process__subtitle {
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: clamp(0.833313rem, calc(1.0417vw * var(--desktop-font-vw-scale, 1)), 1.25rem);
    line-height: clamp(1.5rem, 1.875vw, 2.25rem);
    color: #ffffff;
    opacity: 0.6;
    margin: 0;
    max-width: clamp(22.5rem, 28.125vw, 33.75rem);
}

/* ──────────────────────────────────────────
   RIGHT PANEL — Steps list
   ────────────────────────────────────────── */
.sdp-process__right {
    flex: 0 0 58%;
    max-width: 58%;
    box-sizing: border-box;
    position: relative;
    padding-left: clamp(2.5rem, 3.125vw, 3.75rem);
    padding-block: clamp(2.916688rem, 3.6458vw, 4.375rem);
    display: flex;
    flex-direction: column;
}

/* ──────────────────────────────────────────
   VERTICAL CONNECTOR LINE
   Figma: Rectangle 34 — 2px wide, #202020, runs full height
   ────────────────────────────────────────── */
.sdp-process__line {
    position: absolute;
    left: calc(clamp(2.5rem, 3.125vw, 3.75rem) + clamp(1.875rem, 2.5521vw, 3.0625rem) - 0.0625rem);
    top: calc(clamp(2.916688rem, 3.6458vw, 4.375rem) + clamp(1.875rem, 2.5521vw, 3.0625rem));
    bottom: clamp(2.916688rem, 3.6458vw, 4.375rem);
    width: 0.125rem;
    background-color: #202020;
    overflow: hidden;
    border-radius: 0.125rem;
}

/* Animated fill that grows from top to bottom as user scrolls */
.sdp-process__line-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.12) 100%);
    transform-origin: top center;
    transform: scaleY(0);
    border-radius: 0.125rem;
}

/* ──────────────────────────────────────────
   STEP ROW
   Figma: Group 592 / 591 / 590 — each 617×230px
   Each row: icon circle (98px) + card (494px)
   Gap between rows: 280px top → 280px = prev bottom + 280 – 230 = 50px gap
   ────────────────────────────────────────── */
.sdp-process__step {
    display: flex;
    align-items: flex-start;
    gap: clamp(1.041688rem, 1.3021vw, 1.5625rem);
    margin-bottom: clamp(1.666688rem, 2.0833vw, 2.5rem);
}

.sdp-process__step:last-child {
    margin-bottom: 0;
}

/* ──────────────────────────────────────────
   ICON WRAP + ICON CIRCLE
   Figma: Rectangle 35 — 98×98px white circle #FFFFFF, border-radius 100px
   ────────────────────────────────────────── */
.sdp-process__icon-wrap {
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.sdp-process__icon {
    width: clamp(3.75rem, 5.1042vw, 6.125rem);
    height: clamp(3.75rem, 5.1042vw, 6.125rem);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sdp-process__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* ──────────────────────────────────────────
   STEP CARD
   Figma: Rectangle 25 — 494×230px, bg #101010, border 1px #202020, radius 20px
   ────────────────────────────────────────── */
.sdp-process__card {
    flex: 1;
    background-color: #101010;
    border: 0.0625rem solid #202020;
    border-radius: clamp(0.833313rem, 1.0417vw, 1.25rem);
    padding: clamp(1rem, 1.25vw, 1.5rem) clamp(1.166688rem, 1.4583vw, 1.75rem);
    min-height: clamp(7.5rem, 11.9792vw, 14.375rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Entrance animation starting state */
    will-change: opacity, transform;
}

/* Step Title
   Figma: 30px DM Sans 600 / line-height 43px / capitalize */
.sdp-process__step-title {
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: clamp(1.25rem, calc(1.5625vw * var(--desktop-font-vw-scale, 1)), 1.875rem);
    line-height: clamp(1.791688rem, 2.2396vw, 2.6875rem);
    text-transform: capitalize;
    color: #ffffff;
    margin: 0 0 clamp(0.5rem, 0.625vw, 0.75rem) 0;
    letter-spacing: -0.01em;
}

/* Step Description
   Figma: 18px DM Sans 400 / line-height 28px / opacity 0.6 */
.sdp-process__step-desc {
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: clamp(0.75rem, calc(0.9375vw * var(--desktop-font-vw-scale, 1)), 1.125rem);
    line-height: clamp(1.166688rem, 1.4583vw, 1.75rem);
    color: #ffffff;
    opacity: 0.6;
    margin: 0;
}

/* ──────────────────────────────────────────
   TABLET (769px – 1024px)
   Left + right stack into a single column.
   No sticky — left becomes section header.
   ────────────────────────────────────────── */
@media (max-width: 1023px) {

    .sdp-process__stage {
        flex-direction: column;
        padding-inline: 0;
        padding-block: 6rem 4rem;
        gap: 3rem;
    }

    .sdp-process__left {
        position: static;
        flex: none;
        max-width: 100%;
        width: 100%;
        height: auto;
        padding-top: 0;
        align-items: flex-start;
    }

    .sdp-process__left-inner {
        max-width: 37.5rem;
    }

    .sdp-process__title {
        font-size: 2.25rem;
        line-height: 2.75rem;
    }

    .sdp-process__subtitle {
        font-size: 1rem;
        line-height: 1.625rem;
        max-width: 32.5rem;
    }

    .sdp-process__right {
        flex: none;
        max-width: 100%;
        width: 100%;
        padding-left: 0;
        padding-block: 0;
    }

    .sdp-process__line {
        /* On tablet, line aligns to center of 72px icon */
        left: 2.1875rem; /* icon(72px)/2 − 1px */
        top: 2.25rem;
        bottom: 0;
    }

    .sdp-process__icon {
        width: 4.5rem;
        height: 4.5rem;
    }

    .sdp-process__step {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .sdp-process__card {
        padding: 1.25rem 1.25rem;
        min-height: 6.25rem;
        border-radius: 1rem;
    }

    .sdp-process__step-title {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .sdp-process__step-desc {
        font-size: 0.875rem;
        line-height: 1.375rem;
    }

    /* Line fill visible at 100% on tablet/mobile (no scroll animation) */
    .sdp-process__line-fill {
        transform: scaleY(1);
    }
}

/* ──────────────────────────────────────────
   MOBILE (≤ 768px)
   ────────────────────────────────────────── */
@media (max-width: 767px) {

    .sdp-process__stage {
        padding-inline: 0;
        padding-block: 6rem 3rem;
        gap: 2.25rem;
    }

    .sdp-process__title {
        font-size: 1.75rem;
        line-height: 2.25rem;
    }

    .sdp-process__subtitle {
        font-size: 0.875rem;
        line-height: 1.375rem;
    }

    .sdp-process__line {
        left: 1.6875rem; /* icon(56px)/2 − 1 */
        top: 1.75rem;
    }

    .sdp-process__icon {
        width: 3.5rem;
        height: 3.5rem;
    }

    .sdp-process__step {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .sdp-process__card {
        padding: 1rem;
        border-radius: 0.75rem;
        min-height: 5rem;
    }

    .sdp-process__step-title {
        font-size: 1.0625rem;
        line-height: 1.5rem;
    }

    .sdp-process__step-desc {
        font-size: 0.8125rem;
        line-height: 1.25rem;
    }
}
