/* ================= RESET & BASE ================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    scroll-behavior: auto;
    overflow-x: hidden;
    background: #000
}

body {
    font-family: 'Noto Naskh Arabic', 'Amiri', serif;
    color: #e8dcc8;
    overflow-x: hidden;
    background: #000;
    min-height: 100vh
}

body.lang-en {
    font-family: 'Cinzel', 'Amiri', serif
}

::-webkit-scrollbar {
    width: 0;
    background: transparent
}

/* ================= PRELOADER ================= */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #0a0806;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s ease, visibility 1.2s ease
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none
}

.preloader-inner {
    text-align: center;
    position: relative
}

.preloader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    animation: preloader-pulse 2s ease-in-out infinite
}

.preloader-ring:nth-child(1) {
    width: 100px;
    height: 100px;
    animation-delay: 0s
}

.preloader-ring:nth-child(2) {
    width: 140px;
    height: 140px;
    animation-delay: .3s
}

.preloader-ring:nth-child(3) {
    width: 180px;
    height: 180px;
    animation-delay: .6s
}

@keyframes preloader-pulse {

    0%,
    100% {
        opacity: .2;
        transform: translate(-50%, -50%) scale(.95)
    }

    50% {
        opacity: .8;
        transform: translate(-50%, -50%) scale(1.05)
    }
}

.preloader-text-ar {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    color: rgba(212, 175, 55, .8);
    margin-top: 120px
}

.preloader-text-en {
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    color: rgba(212, 175, 55, .5);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 8px
}

/* ================= CANVAS & OVERLAY ================= */
#scene-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1
}

#vignette-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, .7) 100%)
}

/* ================= CONTROLS ================= */
#lang-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    background: rgba(10, 8, 6, .6);
    border: 1px solid rgba(212, 175, 55, .25);
    color: #d4af37;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: 2px;
    backdrop-filter: blur(8px);
    transition: all .3s ease;
    display: flex;
    align-items: center;
    gap: 8px
}

#lang-toggle:hover {
    background: rgba(212, 175, 55, .15);
    border-color: rgba(212, 175, 55, .5)
}

.lang-ar.active,
.lang-en.active {
    color: #d4af37;
    opacity: 1
}

.lang-ar:not(.active),
.lang-en:not(.active) {
    opacity: .4
}

.lang-divider {
    opacity: .3;
    font-size: .6rem
}

#sound-toggle {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 1000;
    background: rgba(10, 8, 6, .6);
    border: 1px solid rgba(212, 175, 55, .25);
    color: #d4af37;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all .3s ease
}

#sound-toggle:hover {
    background: rgba(212, 175, 55, .15);
    border-color: rgba(212, 175, 55, .5)
}

/* ================= SCROLL INDICATOR ================= */
#scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    opacity: 1;
    transition: opacity .8s ease
}

#scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(212, 175, 55, .6));
    margin: 0 auto 12px;
    animation: scroll-bob 2s ease-in-out infinite
}

@keyframes scroll-bob {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(8px)
    }
}

.scroll-text {
    font-family: 'Amiri', serif;
    font-size: .8rem;
    color: rgba(212, 175, 55, .6);
    letter-spacing: 2px
}

/* ================= SCROLL PROGRESS ================= */
#scroll-progress {
    position: fixed;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    z-index: 1000;
    background: rgba(212, 175, 55, .08)
}

#scroll-progress-bar {
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, rgba(212, 175, 55, .1), rgba(212, 175, 55, .6));
    transition: height .1s linear
}

/* ================= CONTENT OVERLAY ================= */
#content-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center
}

/* ================= CONTENT SECTIONS ================= */
.content-section {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease, visibility .8s ease;
    pointer-events: none
}

.content-section.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto
}

.section-inner {
    max-width: 600px;
    width: 90%;
    text-align: center;
    padding: 30px
}

.section-inner-wide {
    max-width: 900px
}

/* ================= STONE ENGRAVING STYLE ================= */
.stone-engraving {
    position: relative;
    padding: 40px 30px;
    border: 1px solid rgba(212, 175, 55, .2);
    background: rgba(10, 8, 6, .75);
    backdrop-filter: blur(10px);
    border-radius: 2px
}

.stone-engraving::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .4), transparent)
}

.stone-engraving::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .4), transparent)
}

.section-title {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: rgba(212, 175, 55, .85);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(212, 175, 55, .15)
}

body.lang-en .section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    letter-spacing: 6px
}

.engraving-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .5), transparent);
    margin: 0 auto 24px
}

.section-body {
    font-size: 1.05rem;
    line-height: 2;
    color: rgba(232, 220, 200, .8);
    max-width: 500px;
    margin: 0 auto
}

body.lang-en .section-body {
    font-family: 'Cinzel', serif;
    font-size: .85rem;
    line-height: 1.9;
    letter-spacing: 1px
}

/* Language visibility */
.text-en {
    display: none
}

body.lang-en .text-ar {
    display: none
}

body.lang-en .text-en {
    display: block
}

/* ================= WELCOME ================= */
.welcome-section {
    text-align: center
}

.welcome-title {
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    color: rgba(212, 175, 55, .9);
    margin-bottom: 12px;
    text-shadow: 0 0 40px rgba(212, 175, 55, .2);
    line-height: 1.6
}

body.lang-en .welcome-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    letter-spacing: 6px
}

.welcome-subtitle {
    font-family: 'Cinzel', serif;
    font-size: .85rem;
    color: rgba(212, 175, 55, .55);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 30px
}

.welcome-logo {
    margin-top: 20px;
    animation: logo-glow 4s ease-in-out infinite
}

@keyframes logo-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, .1))
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(212, 175, 55, .3))
    }
}

/* ================= VALUES ================= */
.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px
}

.value-item {
    padding: 18px 12px;
    border: 1px solid rgba(212, 175, 55, .15);
    background: rgba(20, 16, 10, .6);
    border-radius: 2px;
    transition: border-color .3s ease, background .3s ease
}

.value-item:hover {
    border-color: rgba(212, 175, 55, .35);
    background: rgba(212, 175, 55, .1)
}

.value-icon {
    font-size: 1.6rem;
    margin-bottom: 8px
}

.value-name {
    font-family: 'Amiri', serif;
    font-size: 1rem;
    color: rgba(212, 175, 55, .8);
    margin-bottom: 4px
}

body.lang-en .value-name {
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: 3px
}

.value-desc {
    font-size: .8rem;
    color: rgba(232, 220, 200, .5);
    line-height: 1.5
}

body.lang-en .value-desc {
    font-family: 'Cinzel', serif;
    font-size: .65rem;
    letter-spacing: 1px
}

/* ================= TEAM ================= */
.section-inner-team {
    max-width: 750px;
    width: 92%;
    text-align: center;
    padding: 20px
}

.team-title-standalone {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: rgba(212, 175, 55, .85);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(212, 175, 55, .15)
}

body.lang-en .team-title-standalone {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    letter-spacing: 6px
}

.team-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, .25) transparent
}

.team-stack::-webkit-scrollbar {
    width: 3px
}

.team-stack::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, .3);
    border-radius: 3px
}

.team-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid rgba(212, 175, 55, .2);
    background: rgba(10, 8, 6, .8);
    backdrop-filter: blur(10px);
    border-radius: 3px;
    text-align: right;
    direction: rtl;
    transition: border-color .4s ease, background .4s ease, transform .4s ease
}

body.lang-en .team-card {
    text-align: left;
    direction: ltr
}

.team-card:hover {
    border-color: rgba(212, 175, 55, .4);
    background: rgba(15, 12, 8, .9);
    transform: translateX(-3px)
}

body.lang-en .team-card:hover {
    transform: translateX(3px)
}

.card-icon {
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 4px
}

.card-info {
    flex: 1;
    min-width: 0
}

.member-name {
    font-family: 'Amiri', serif;
    font-size: 1.05rem;
    color: rgba(212, 175, 55, .95);
    margin-bottom: 3px;
    font-weight: 700
}

body.lang-en .member-name {
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    letter-spacing: 2px
}

.member-role {
    font-family: 'Amiri', serif;
    font-size: .82rem;
    color: rgba(212, 175, 55, .6);
    margin-bottom: 8px
}

body.lang-en .member-role {
    font-family: 'Cinzel', serif;
    font-size: .68rem;
    letter-spacing: 2px;
    text-transform: uppercase
}

.member-bio {
    font-size: .76rem;
    line-height: 1.7;
    color: rgba(232, 220, 200, .75);
    text-align: right;
    direction: rtl
}

body.lang-en .member-bio {
    font-family: 'Cinzel', serif;
    font-size: .63rem;
    line-height: 1.7;
    letter-spacing: .5px;
    text-align: left;
    direction: ltr
}

/* ================= OUR WORKS (wall style) ================= */
.works-wall-section {
    max-width: 500px;
    text-align: center
}

.wall-title {
    font-family: 'Amiri', serif;
    font-size: 2.6rem;
    color: rgba(212, 175, 55, .85);
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 0 0 40px rgba(212, 175, 55, .2), 0 2px 8px rgba(0, 0, 0, .6);
    letter-spacing: 4px
}

body.lang-en .wall-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    letter-spacing: 10px
}

.wall-divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .5), transparent);
    margin: 0 auto 20px
}

.wall-subtitle {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    color: rgba(212, 175, 55, .5);
    text-shadow: 0 0 20px rgba(212, 175, 55, .15);
    letter-spacing: 3px
}

body.lang-en .wall-subtitle {
    font-family: 'Cinzel', serif;
    font-size: .9rem;
    letter-spacing: 8px;
    text-transform: uppercase
}

.wall-emblem {
    font-size: 3rem;
    margin-top: 24px;
    opacity: .4;
    animation: pulse-icon 3s ease-in-out infinite
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
        opacity: .4
    }

    50% {
        transform: scale(1.1);
        opacity: .7
    }
}

/* ================= CONTACT US ================= */
.contact-engraving {
    max-width: 550px;
    margin: 0 auto;
    background: rgba(10, 8, 6, .8);
    border: 1px solid rgba(212, 175, 55, .25)
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 24px;
    align-items: center
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(212, 175, 55, .8);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    letter-spacing: 2px;
    padding: 12px 24px;
    border: 1px solid rgba(212, 175, 55, .2);
    border-radius: 2px;
    transition: all .3s ease;
    pointer-events: auto;
    background: rgba(10, 8, 6, .7);
    min-width: 280px;
    justify-content: center
}

.contact-link:hover {
    color: rgba(212, 175, 55, 1);
    border-color: rgba(212, 175, 55, .4);
    background: rgba(212, 175, 55, .08);
    transform: translateY(-2px)
}

.contact-link svg {
    flex-shrink: 0
}

.final-emblem-small {
    margin-top: 30px;
    opacity: .6
}

.made-by-credit {
    margin-top: 16px;
    font-family: 'Cinzel', serif;
    font-size: .7rem;
    color: rgba(212, 175, 55, .35);
    letter-spacing: 3px;
    text-transform: lowercase
}

/* ================= FINAL SECTION ================= */
.final-section {
    text-align: center
}

.final-reveal {
    position: relative
}

.final-light-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, .12) 0%, transparent 70%);
    border-radius: 50%;
    animation: light-burst 4s ease-in-out infinite;
    pointer-events: none
}

@keyframes light-burst {

    0%,
    100% {
        opacity: .3;
        transform: translate(-50%, -50%) scale(.8)
    }

    50% {
        opacity: .8;
        transform: translate(-50%, -50%) scale(1.2)
    }
}

.final-text-ar {
    font-family: 'Amiri', serif;
    font-size: 2.2rem;
    color: rgba(212, 175, 55, .95);
    text-shadow: 0 0 50px rgba(212, 175, 55, .3);
    line-height: 1.6;
    position: relative;
    z-index: 1
}

body.lang-en .final-text-ar {
    display: none
}

.final-text-en {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: rgba(212, 175, 55, .6);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 10px;
    position: relative;
    z-index: 1
}

body.lang-en .final-text-ar {
    display: none
}

body.lang-en .final-text-en {
    display: block;
    font-size: 1.6rem;
    color: rgba(212, 175, 55, .95)
}

body:not(.lang-en) .final-text-en {
    display: block
}

/* ================= SCROLL SPACER ================= */
#scroll-spacer {
    height: 12000px;
    pointer-events: none
}

/* ================= RESPONSIVE ================= */
@media(max-width:768px) {
    .section-inner {
        padding: 20px 15px
    }

    .section-inner-team {
        max-width: 95%
    }

    .section-title {
        font-size: 1.6rem
    }

    .section-body {
        font-size: .9rem
    }

    .welcome-title {
        font-size: 1.6rem
    }

    .values-grid {
        grid-template-columns: 1fr
    }

    .team-card {
        padding: 12px 14px;
        gap: 12px
    }

    .member-bio {
        font-size: .7rem
    }

    .contact-link {
        min-width: auto;
        padding: 10px 18px;
        font-size: .7rem
    }

    .final-text-ar {
        font-size: 1.6rem
    }

    .wall-title {
        font-size: 2rem
    }

    #lang-toggle {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: .65rem
    }

    #sound-toggle {
        top: 12px;
        left: 12px;
        width: 34px;
        height: 34px
    }
}

@media(max-width:480px) {
    .section-title {
        font-size: 1.3rem
    }

    .welcome-title {
        font-size: 1.3rem
    }

    .stone-engraving {
        padding: 24px 16px
    }

    .team-card {
        flex-direction: column;
        align-items: center;
        text-align: center
    }

    .team-card .member-bio {
        text-align: center
    }

    .wall-title {
        font-size: 1.6rem
    }
}