/* =========================================================
   LIFE MEDIA — OUR WORK
   Cinematic Showcase
   ========================================================= */

.work-section {
    position: relative;
    overflow: hidden;
    padding: 42px 6vw 130px;
    background:
        radial-gradient(ellipse 55% 28% at 78% 12%,
            rgba(73,200,242,.055),
            transparent 70%),
        radial-gradient(ellipse 45% 24% at 16% 42%,
            rgba(242,11,120,.06),
            transparent 70%),
        #08090d;
    color: #fff;
}

.work-inner {
    width: min(1400px, 100%);
    margin: 0 auto;
}

.work-intro {
    margin-bottom: 75px;
}

.work-eyebrow {
    margin-bottom: 28px;
    color: rgba(255,255,255,.52);
    font: 700 12px/1 "Cairo", sans-serif;
    letter-spacing: .24em;
    direction: ltr;
}

.work-intro-grid {
    display: grid;
    grid-template-columns: minmax(450px, 1fr) minmax(280px, .65fr);
    gap: 8vw;
    align-items: end;
}

.work-intro h2 {
    margin: 0;
    font: 800 clamp(50px, 6.2vw, 92px)/.98 "Cairo", sans-serif;
    letter-spacing: -.045em;
}

.work-intro h2 span {
    display: inline-block;
    margin-top: 12px;
    color: #f20b78;
}

.work-intro p {
    max-width: 440px;
    margin: 0 0 5px auto;
    color: rgba(255,255,255,.48);
    font: 400 15px/2 "Cairo", sans-serif;
}

.work-feature {
    position: relative;
}

.work-feature-media {
    position: relative;
    display: block;
    height: min(62vh, 660px);
    min-height: 460px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    background: #0d1117;
    isolation: isolate;
}

.work-feature-media img,
.work-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.22,.61,.36,1), opacity .6s ease;
}

.work-feature-media img {
    object-position: center;
}

.work-media-shade,
.work-card-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(4,7,11,.08) 20%, rgba(4,7,11,.78) 100%),
        linear-gradient(90deg, rgba(4,7,11,.35), transparent 55%);
}

.work-media-index {
    position: absolute;
    z-index: 2;
    top: 28px;
    left: 30px;
    color: rgba(255,255,255,.75);
    font: 500 13px/1 "Space Grotesk", sans-serif;
    letter-spacing: .08em;
}

.work-media-tag {
    position: absolute;
    z-index: 2;
    left: 30px;
    bottom: 28px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(4,7,11,.35);
    backdrop-filter: blur(8px);
    font: 700 16px/1 "Cairo", sans-serif;
    letter-spacing: .12em;
}

.work-media-play {
    position: absolute;
    z-index: 3;
    right: 32px;
    top: 32px;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    background: rgba(4,7,11,.3);
    backdrop-filter: blur(8px);
    box-shadow: 0 0 30px rgba(242,11,120,.14);
    transition: transform .4s ease, background .4s ease, border-color .4s ease;
}

.work-media-play span {
    font: 21px/1 "Space Grotesk", sans-serif;
    transition: transform .4s ease;
}

.work-feature-info {
    display: grid;
    grid-template-columns: 1fr minmax(280px, .65fr);
    gap: 8vw;
    padding: 30px 0 0;
}

.work-category,
.work-card-info > span {
    display: block;
    color: rgba(255,255,255,.42);
    font: 700 16px/1 "Cairo", sans-serif;
    letter-spacing: .16em;
    direction: ltr;
}

.work-feature-info h3 {
    margin: 13px 0 0;
    font: 700 clamp(32px, 4vw, 56px)/1.08 "Cairo", sans-serif;
}

.work-feature-meta {
    align-self: end;
}

.work-feature-meta p {
    max-width: 430px;
    margin: 0 0 24px auto;
    color: rgba(255,255,255,.48);
    font: 400 14px/1.9 "Cairo", sans-serif;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #fff;
    font: 700 10px/1 "Space Grotesk", sans-serif;
    letter-spacing: .14em;
    direction: ltr;
}

.work-link span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    transition: .35s ease;
}

.work-secondary {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 22px;
    margin-top: 75px;
}

.work-card {
    color: inherit;
}

.work-card-media {
    position: relative;
    height: 310px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.11);
    background: #0d1117;
    isolation: isolate;
}

.work-card-large .work-card-media {
    height: 390px;
}

.work-card-number {
    position: absolute;
    z-index: 2;
    left: 20px;
    top: 20px;
    font: 500 11px/1 "Space Grotesk", sans-serif;
    color: rgba(255,255,255,.7);
}

.work-card-arrow {
    position: absolute;
    z-index: 2;
    right: 20px;
    top: 20px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    background: rgba(4,7,11,.28);
    backdrop-filter: blur(6px);
    font: 17px/1 "Space Grotesk", sans-serif;
    transition: .35s ease;
}

.work-card-info {
    padding: 17px 2px 0;
}

.work-card-info h3 {
    margin: 9px 0 0;
    font: 600 21px/1.2 "Cairo", sans-serif;
    letter-spacing: -.02em;
}

.work-feature-media:hover img,
.work-card:hover img {
    transform: scale(1.06);
}

.work-feature-media:hover .work-media-play {
    transform: scale(1.08) rotate(8deg);
    background: #f20b78;
    border-color: #f20b78;
}

.work-feature-media:hover .work-media-play span {
    transform: rotate(-8deg);
}

.work-card:hover .work-card-arrow {
    transform: rotate(45deg);
    background: #f20b78;
    border-color: #f20b78;
}

.work-link:hover span {
    transform: rotate(45deg);
    background: #f20b78;
    border-color: #f20b78;
}

.work-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 55px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.11);
}

.work-footer span {
    color: rgba(255,255,255,.3);
    font: 700 9px/1 "Space Grotesk", sans-serif;
    letter-spacing: .18em;
}

.work-footer a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font: 700 10px/1 "Space Grotesk", sans-serif;
    letter-spacing: .12em;
}

.work-footer b {
    font-size: 16px;
    font-weight: 400;
    transition: transform .3s ease;
}

.work-footer a:hover b {
    transform: translate(3px,-3px);
}

@media (max-width: 900px) {
    .work-section {
        padding: 34px 5vw 95px;
    }

    .work-intro {
        margin-bottom: 50px;
    }

    .work-intro-grid,
    .work-feature-info {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .work-intro p,
    .work-feature-meta p {
        margin: 0;
    }

    .work-feature-media {
        min-height: 390px;
        height: 58vh;
    }

    .work-secondary {
        grid-template-columns: 1fr 1fr;
        margin-top: 55px;
    }

    .work-card-large {
        grid-column: 1 / -1;
    }

    .work-card-large .work-card-media {
        height: 350px;
    }
}

@media (max-width: 600px) {
    .work-section {
        padding: 26px 22px 75px;
    }

    .work-intro h2 {
        font-size: clamp(44px, 13vw, 68px);
    }

    .work-intro h2 span {
        margin-top: 9px;
    }

    .work-intro p {
        font-size: 14px;
        line-height: 1.85;
    }

    .work-feature-media {
        min-height: 330px;
        height: 62vw;
    }

    .work-media-index,
    .work-media-tag {
        left: 18px;
    }

    .work-media-tag {
        bottom: 18px;
    }

    .work-media-play {
        right: 18px;
        top: 18px;
        width: 50px;
        height: 50px;
    }

    .work-secondary {
        grid-template-columns: 1fr;
        gap: 38px;
        margin-top: 45px;
    }

    .work-card-large {
        grid-column: auto;
    }

    .work-card-media,
    .work-card-large .work-card-media {
        height: 230px;
    }

    .work-footer {
        margin-top: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-feature-media img,
    .work-card img,
    .work-media-play,
    .work-media-play span,
    .work-card-arrow,
    .work-link span,
    .work-footer b {
        transition: none !important;
    }
}


/* =========================================================
   WORK — TOP EDGE CONTINUITY
   The section receives the same dark atmosphere as Services.
   ========================================================= */
.work-section::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 10%;
    right: 10%;
    top: -55px;
    height: 150px;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 22% 50%, rgba(242,11,120,.075), transparent 30%),
        radial-gradient(ellipse at 58% 45%, rgba(73,200,242,.055), transparent 34%),
        radial-gradient(ellipse at 82% 52%, rgba(246,233,0,.032), transparent 24%);
    filter: blur(30px);
}

.work-inner {
    position: relative;
    z-index: 2;
}


/* =========================================================
   SERVICES → OUR WORK — LIVING TRANSITION V2
   ========================================================= */

.work-section {
    position: relative;
    margin-top: -1px;
    padding-top: 48px;

    background:
        radial-gradient(
            ellipse 68% 30% at 50% 0%,
            rgba(242,11,120,.16) 0%,
            rgba(73,200,242,.09) 30%,
            rgba(246,233,0,.035) 48%,
            transparent 72%
        ),
        radial-gradient(
            ellipse 35% 18% at 78% 4%,
            rgba(246,233,0,.055),
            transparent 72%
        ),
        radial-gradient(
            ellipse 38% 18% at 18% 5%,
            rgba(242,11,120,.055),
            transparent 72%
        ),
        linear-gradient(
            180deg,
            #07080c 0%,
            #08090d 125px,
            #08090d 100%
        );
}

/* Atmospheric transition field */
.work-section::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -20px;
    left: 8%;
    right: 8%;
    height: 125px;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse at 18% 48%,
            rgba(242,11,120,.20),
            transparent 30%
        ),
        radial-gradient(
            ellipse at 50% 45%,
            rgba(73,200,242,.13),
            transparent 32%
        ),
        radial-gradient(
            ellipse at 82% 48%,
            rgba(246,233,0,.07),
            transparent 25%
        );
    filter: blur(28px);
    opacity: .9;
}

/* The actual animated neon boundary */
.work-section::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: 0;
    left: 5%;
    right: 5%;
    height: 2px;
    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(242,11,120,.10) 10%,
            rgba(242,11,120,.82) 28%,
            rgba(73,200,242,.76) 50%,
            rgba(246,233,0,.52) 70%,
            transparent 90%
        );

    background-size: 180% 100%;
    animation: workBoundaryFlowV2 7s linear infinite;

    box-shadow:
        0 0 8px rgba(242,11,120,.30),
        0 0 22px rgba(73,200,242,.18),
        0 0 42px rgba(246,233,0,.08);
}

@keyframes workBoundaryFlowV2 {
    0% {
        background-position: 100% 0;
        opacity: .55;
    }

    50% {
        background-position: 0% 0;
        opacity: 1;
    }

    100% {
        background-position: -100% 0;
        opacity: .55;
    }
}

/* Secondary moving light masses */
.work-section .work-inner::before,
.work-section .work-inner::after {
    content: "";
    position: absolute;
    top: -38px;
    width: 230px;
    height: 90px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(30px);
    opacity: .46;
    z-index: -1;
}

.work-section .work-inner::before {
    left: 12%;
    background:
        radial-gradient(
            ellipse,
            rgba(242,11,120,.24) 0%,
            rgba(242,11,120,.07) 38%,
            transparent 72%
        );
    animation: workAmbientLeftV2 8s ease-in-out infinite;
}

.work-section .work-inner::after {
    right: 13%;
    background:
        radial-gradient(
            ellipse,
            rgba(73,200,242,.19) 0%,
            rgba(246,233,0,.055) 40%,
            transparent 72%
        );
    animation: workAmbientRightV2 9s ease-in-out infinite reverse;
}

@keyframes workAmbientLeftV2 {
    0%, 100% {
        transform: translate3d(-18px, 0, 0) scale(.92);
    }
    50% {
        transform: translate3d(35px, 8px, 0) scale(1.12);
    }
}

@keyframes workAmbientRightV2 {
    0%, 100% {
        transform: translate3d(20px, 4px, 0) scale(.9);
    }
    50% {
        transform: translate3d(-32px, -5px, 0) scale(1.1);
    }
}

/* Content stays above the transition */
.work-inner {
    position: relative;
    z-index: 2;
}

.work-intro {
    position: relative;
    margin-bottom: 58px;
}

.work-intro::before {
    content: "";
    position: absolute;
    top: -21px;
    left: 0;
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, #f20b78, #49c8f2);
    box-shadow: 0 0 12px rgba(242,11,120,.35);
    opacity: .72;
}

@media (max-width: 900px) {
    .work-section {
        padding-top: 38px;
    }

    .work-section::after {
        left: 5%;
        right: 5%;
    }

    .work-intro {
        margin-bottom: 46px;
    }

    .work-intro::before {
        top: -18px;
    }
}

@media (max-width: 600px) {
    .work-section {
        padding-top: 30px;
    }

    .work-intro {
        margin-bottom: 38px;
    }

    .work-intro::before {
        top: -15px;
        width: 30px;
    }

    .work-section .work-inner::before,
    .work-section .work-inner::after {
        width: 150px;
        height: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-section::after,
    .work-section .work-inner::before,
    .work-section .work-inner::after {
        animation: none !important;
    }
}


/* =========================================================
   CLIENTS → OUR WORK — EDGE LOCK
   ========================================================= */

.work-section {
    margin-top: -1px;
    padding-top: 42px;
}

/* Let the atmospheric transition visually bridge the two sections */
.work-section::before {
    top: -34px;
    height: 145px;
    opacity: .95;
}

.work-section::after {
    top: 0;
    left: 5%;
    right: 5%;
    height: 2px;
}

@media (max-width: 900px) {
    .work-section {
        margin-top: -1px;
        padding-top: 34px;
    }

    .work-section::before {
        top: -28px;
        height: 125px;
    }
}

@media (max-width: 600px) {
    .work-section {
        margin-top: -1px;
        padding-top: 28px;
    }

    .work-section::before {
        top: -24px;
        height: 105px;
    }
}


/* =========================================================
   OUR WORK → OUR CLIENTS — FINAL SECTION BRIDGE
   Page order: Work is ABOVE Clients.
   ========================================================= */

/* Remove the excessive dead space at the bottom of Work */
.work-section {
    padding-bottom: 48px;
}

/* The transition is attached to the BOTTOM of Work */
.work-section::after {
    top: auto;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(242,11,120,.10) 10%,
            rgba(242,11,120,.82) 28%,
            rgba(73,200,242,.76) 50%,
            rgba(246,233,0,.52) 70%,
            transparent 90%
        );

    background-size: 180% 100%;
    animation: workClientsBoundaryFlow 7s linear infinite;

    box-shadow:
        0 0 8px rgba(242,11,120,.30),
        0 0 22px rgba(73,200,242,.16),
        0 0 42px rgba(246,233,0,.07);
}

/* Glow extending downward from Work into Clients */
.work-section::before {
    top: auto;
    bottom: -45px;
    left: 7%;
    right: 7%;
    height: 120px;

    background:
        radial-gradient(
            ellipse at 18% 45%,
            rgba(242,11,120,.18),
            transparent 31%
        ),
        radial-gradient(
            ellipse at 50% 48%,
            rgba(73,200,242,.12),
            transparent 34%
        ),
        radial-gradient(
            ellipse at 82% 45%,
            rgba(246,233,0,.065),
            transparent 27%
        );

    filter: blur(28px);
    opacity: .9;
    pointer-events: none;
}

@keyframes workClientsBoundaryFlow {
    0% {
        background-position: 100% 0;
        opacity: .55;
    }
    50% {
        background-position: 0% 0;
        opacity: 1;
    }
    100% {
        background-position: -100% 0;
        opacity: .55;
    }
}

@media (max-width: 900px) {
    .work-section {
        padding-bottom: 36px;
    }

    .work-section::after {
        left: 5%;
        right: 5%;
    }

    .work-section::before {
        bottom: -38px;
        height: 105px;
    }
}

@media (max-width: 600px) {
    .work-section {
        padding-bottom: 28px;
    }

    .work-section::before {
        bottom: -32px;
        height: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-section::after {
        animation: none !important;
    }
}
