:root {
    --bg: #0B0F14;
    --surface: #0E1720;
    --elev: #0F1B25;
    --muted: #10222C;
    --teal: #0A6B3A;
    --teal-700: #064A2A;
    --pink: #55913E;
    --pink-700: #006838;
    --text: #EAF6F5;
    --text-dim: #A9C3C0;
    --stroke: rgba(255, 255, 255, .08);
    --slide-dur: 1.25s
}

* {
    box-sizing: border-box;
    font-family: Tajawal, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    color: var(--text);
    letter-spacing: .1px;
    overflow-x: hidden;
    background: var(--bg)
}

html,
body {
    overflow-x: clip
}

.canvas {
    background: radial-gradient(1000px 700px at 50% 30%, rgba(0, 104, 56, 0.18) 0%, transparent 70%), radial-gradient(800px 600px at 85% 0%, rgba(24, 11, 23, 0.08) 0%, transparent 60%), var(--bg)
}

#bgcode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: -1
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    position: relative
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(14, 23, 32, .55);
    backdrop-filter: blur(14px);
    padding: 12px 18px;
    border-radius: 28px;
    border: 1px solid var(--stroke);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    transition: background .35s ease, border-color .35s ease, box-shadow .35s ease
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: center;
    overflow: auto;
    scrollbar-width: none
}

.nav::-webkit-scrollbar {
    display: none
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--stroke);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dim);
    text-decoration: none;
    transition: .25s transform, .25s box-shadow, .25s color, .25s background;
    flex: 0 0 auto
}

.pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(0, 104, 56, .35);
    color: var(--text)
}

.pill.active {
    background: linear-gradient(135deg, var(--teal), var(--teal-700));
    color: #fff;
    border-color: transparent
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pink), var(--pink-700));
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 12px 30px rgba(0, 104, 56, .22);
    transition: .18s transform, .18s box-shadow;
    flex: 0 0 auto;
    white-space: nowrap
}

.cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 104, 56, .30)
}

.burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--stroke);
    color: var(--text);
    font-size: 22px;
    line-height: 1
}

.lang-switch {
    display: flex;
    gap: 6px
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px
}

.hero-text h1 {
    margin: 0;
    font-size: 56px;
    line-height: 1.1;
    font-weight: 800;
    text-align: center
}

.hero-text .tag {
    margin-top: 20px;
    font-size: 24px;
    color: #B7D6D1;
    text-align: center
}

.section {
    margin: 0
}

.section+.section {
    margin-top: 200px
}

.section h2 {
    font-size: 40px;
    font-weight: 800;
    text-align: center;
    margin: 8px 0 50px
}

.tiles {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 24px
}

.card3d {
    perspective: 100px
}

.card {
    position: relative;
    width: 100%;
    min-height: 110px;
    border-radius: 20px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, var(--elev), var(--surface));
    box-shadow: 0 20px 60px rgba(0, 104, 56, .08) inset, 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .25);
    transform-style: preserve-3d
}

.slide-card {
    overflow: hidden
}

.layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    backface-visibility: hidden;
    transition: transform var(--slide-dur) cubic-bezier(.22, .61, .36, 1), opacity .45s ease
}

.layer-front {
    background: rgba(14, 23, 32, .55);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    transform: translateX(0);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch
}

.layer-front .ttl,
.layer-front .cap {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center
}

.layer-front .ttl {
    font-size: 22px;
    font-weight: 800;
    margin: 0
}

.layer-front .cap {
    font-size: 14px;
    color: var(--text-dim)
}

.layer-back {
    background: linear-gradient(135deg, var(--pink), var(--pink-700));
    transform: translateX(100%);
    opacity: 0
}

@media(hover:hover) and (pointer:fine) {
    .card3d:hover .layer-front {
        transform: translateX(-100%)
    }

    .card3d:hover .layer-back {
        transform: translateX(0);
        opacity: 1
    }

    .card3d.reverse .layer-back {
        transform: translateX(-100%)
    }

    .card3d.reverse:hover .layer-front {
        transform: translateX(100%)
    }

    .card3d.reverse:hover .layer-back {
        transform: translateX(0);
        opacity: 1
    }
}

@media(hover:none), (pointer:coarse) {
    .card3d:hover .layer-front {
        transform: none
    }

    .card3d:hover .layer-back {
        transform: translateX(100%);
        opacity: 0
    }

    .card3d.reverse:hover .layer-front {
        transform: none
    }

    .card3d.reverse:hover .layer-back {
        transform: translateX(-100%);
        opacity: 0
    }

    .card3d.flipped .layer-front {
        transform: translateX(-100%)
    }

    .card3d.flipped .layer-back {
        transform: translateX(0);
        opacity: 1
    }

    .card3d.reverse .layer-back {
        transform: translateX(-100%)
    }

    .card3d.reverse.flipped .layer-front {
        transform: translateX(100%)
    }

    .card3d.reverse.flipped .layer-back {
        transform: translateX(0);
        opacity: 1
    }
}

.card3d.reverse .layer-front {
    direction: ltr;
    text-align: left
}

.card3d.reverse .layer-front .ttl,
.card3d.reverse .layer-front .cap {
    direction: rtl
}

.layer .ttl {
    font-size: 20px;
    font-weight: 800;
    text-align: center
}

.layer .cap {
    font-size: 17px;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.7
}

.layer .cap p {
    margin-bottom: 0
}

.works {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px
}

.work3d {
    perspective: 900px;
    transform-style: preserve-3d
}

.work {
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, var(--elev), var(--surface));
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
    transform-style: preserve-3d;
    will-change: transform
}

.work .shot {
    position: relative;
    height: 180px;
    border-radius: 14px;
    background: linear-gradient(to right, rgba(255, 255, 255, .06) 0 74px, transparent 74px), radial-gradient(600px 160px at 60% 30%, rgba(0, 104, 56, .12), transparent 60%), linear-gradient(135deg, #0E2230, #121B26);
    overflow: hidden
}

.work .cap {
    text-align: center;
    color: var(--text-dim)
}

.process {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px
}

.step {
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, var(--elev), var(--surface));
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 18px;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
    text-align: center
}

.step:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 50px rgba(0, 104, 56, .12)
}

.step .chip {
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--stroke);
    padding: 6px 10px;
    font-weight: 700;
    margin-left: 8px
}

.step .ttl {
    font-size: 18px;
    font-weight: 800;
    margin: 6px 0 2px
}

.step .cap {
    font-size: 13px;
    color: var(--text-dim)
}

.bottom-cta {
    display: flex;
    justify-content: center;
    margin: 24px 0 80px
}

@media(min-width:781px) {
    .tiles .card {
        min-height: 100px
    }

    .layer .cap {
        font-size: 16px
    }
}

@media(max-width:980px) {
    .works {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:780px) {
    .container {
        padding: 16px
    }

    .topbar {
        top: 0
    }

    .burger {
        display: inline-flex
    }

    .nav {
        position: fixed;
        right: 0;
        left: 0;
        top: 72px;
        background: rgba(11, 15, 20, .98);
        border-top: 1px solid var(--stroke);
        padding: 16px;
        gap: 12px;
        flex-direction: column;
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        transition: .28s transform ease, .2s opacity ease;
        z-index: 18
    }

    .topbar.open .nav {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto
    }

    .scrim {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        display: none;
        z-index: 15
    }

    .hero-text h1 {
        font-size: 42px
    }

    .tiles {
        grid-template-columns: 1fr
    }

    .tiles .card {
        min-height: 210px
    }

    .process {
        grid-template-columns: 1fr
    }

    .layer-front {
        grid-template-columns: 1fr;
        text-align: center
    }

    .card3d.reverse .layer-front {
        text-align: center;
        direction: rtl
    }

    .layer .cap {
        font-size: 16px
    }
}

@media(max-width:520px) {
    .hero {
        gap: 20px;
        margin: 18px 0 28px
    }

    .hero-text h1 {
        font-size: 30px
    }

    .hero-text .tag {
        font-size: 18px
    }

    .works {
        grid-template-columns: 1fr
    }
}

a {
    text-decoration: none
}

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: #000;
    opacity: 1;
    visibility: visible;
    transition: opacity .6s ease, visibility 0s .6s
}

@media (max-width:780px) {
    .intro-overlay {
        height: 100dvh
    }
}

.intro-overlay.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none
}

.intro-vid {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 100dvh
}

@media (max-width:780px) {
    .intro-vid {
        object-fit: contain
    }
}

.step .num {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--pink-700));
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: 0 12px 30px rgba(0, 104, 56, .22);
    margin-left: 10px;
    font-size: 16px;
    margin-bottom: 10px
}

body.lang-en #works .wf-slide {
    direction: ltr
}

body.lang-ar #works .wf-slide {
    direction: rtl
}

@media (max-width:780px) {
    .topbar>.lang-switch {
        display: none !important
    }

    .nav .lang-switch {
        display: flex !important;
        position: static !important;
        transform: none !important;
        right: auto !important;
        top: auto !important;
        white-space: normal !important;
        gap: 8px;
        align-self: center
    }

    .nav .lang-switch .lang-btn {
        display: inline-flex !important
    }

    .nav .lang-switch .lang-toggle {
        display: none !important
    }

    .bottom-cta {
        display: flex !important
    }
}

@media (max-width:780px) {
    body.lang-en .hero-text h1 {
        position: relative;
        color: transparent
    }

    body.lang-en .hero-text h1::after {
        content: "Beauty above\A•\APower below";
        white-space: pre;
        display: block;
        color: var(--text);
        font-weight: 800;
        font-size: 42px;
        line-height: 1.12;
        text-align: center;
        letter-spacing: .2px
    }
}

.ws-modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, .82);
    z-index: 10010
}

.ws-modal.open {
    display: grid
}

.ws-modal-content {
    max-width: 96vw;
    max-height: 90vh;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--stroke);
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .6)
}

.ws-modal-content img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain
}

.ws-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--stroke);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

#works .works-flip {
    border-radius: 20px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, var(--elev), var(--surface));
    padding: 14px;
    box-shadow: 0 20px 60px rgba(0, 104, 56, .08) inset, 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .25)
}

#works .wf-viewport {
    overflow: hidden;
    border-radius: 14px;
    transition: height .3s ease;
    height: auto !important
}

#works .wf-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
    will-change: transform
}

#works .wf-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px
}

#works .wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, var(--elev), var(--surface));
    border: 1px solid var(--stroke);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 104, 56, .12), 0 1px 0 rgba(255, 255, 255, .04) inset;
    padding: clamp(6px, 1.2vw, 10px);
    direction: ltr
}

#works .flip-container {
    display: inline-block;
    perspective: 1000px;
    vertical-align: top;
    width: clamp(160px, 32vw, 380px);
    height: clamp(210px, 28vw, 300px)
}

#works .flip {
    transition: .6s;
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%
}

#works .front,
#works .back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--stroke)
}

#works .front {
    z-index: 2;
    background: transparent
}

#works .front .front-split {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(0);
    will-change: transform;
    image-rendering: auto;
    cursor: default;        
}

#works .front-left .front-split{
    width: 205px;
    height: 256px;
    top: 21px;
    left: 274px;
    right: auto;
}


#works .front-right .front-split {
    width: 205px;
    height: 256px;
    top: 21px;
    left: -102px;
    right: auto;
}

@media (max-width:780px) {
    #works .front-left .front-split {
        width: 246px;
        height: 308px;
        left: 17px;
        right: auto;
        top: 3px;
    }

    #works .front-right .front-split {
        width: 246px;
        height: 308px;
        left: 17px;
        right: auto;
        top: -154px;
    }
}

#works .back {
    background: rgb(20, 20, 20);
    transform: rotateY(180deg)
}

#works .back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: default
}

#works .back-left {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000
}

#works .back-left img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain
}

#works .back-right {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--elev), var(--surface));
    padding: 12px
}

#works .details {
    width: min(560px, 96%);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--stroke);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    gap: 8px
}

#works .dhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
}

#works .dkicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal), var(--teal-700));
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: 0 10px 22px rgba(0, 104, 56, .22)
}

#works .visit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal), var(--teal-700));
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: 0 10px 22px rgba(0, 104, 56, .18);
    white-space: nowrap
}

#works .dtitle {
    margin: 0;
    font-size: clamp(16px, 1.6vw, 18px);
    font-weight: 800;
    text-align: start;
    letter-spacing: .2px;
    word-wrap: break-word
}

#works .ddesc {
    margin: 2px 0 0;
    color: var(--text-dim);
    font-size: clamp(12px, 1.1vw, 13px);
    line-height: 1.7;
    text-align: start
}

#works .dtags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px
}

#works .dtags .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--stroke);
    font-size: 11px
}

#works .dtags .tag:hover {
    box-shadow: 0 0 0 1px rgba(0, 104, 56, .45)
}

#works .wrapper:hover .flip-left {
    transform: rotateY(-180deg)
}

#works .wrapper:hover .flip-right {
    transform: rotateY(180deg)
}

#works .wrapper.tap-flip .flip-left {
    transform: rotateY(-180deg)
}

#works .wrapper.tap-flip .flip-right {
    transform: rotateY(180deg)
}

#works .wf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 6px 0
}

#works .wf-prev,
#works .wf-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--stroke);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    transition: .18s transform, .18s box-shadow, .18s border-color
}

#works .wf-prev:hover,
#works .wf-next:hover {
    transform: translateY(-2px);
    border-color: var(--teal);
    box-shadow: 0 0 0 1px rgba(0, 104, 56, .4)
}

@media(max-width:980px) {
    #works .wf-slide {
        padding: 10px
    }

    #works .flip-container {
        width: clamp(150px, 46vw, 340px);
        height: clamp(200px, 34vw, 260px)
    }
}

@media(max-width:780px) {
    #works .wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding: 12px;
        width: 100%
    }

    #works .flip-container {
        width: 100%;
        max-width: 700px;
        aspect-ratio: 16/9;
        height: auto
    }

    #works .details {
        width: min(94vw, 560px)
    }
}

@media(max-width:520px) {
    #works .dtags {
        display: none;
    }
}
