@font-face { font-family: 'Rooyin'; src: url('RooyinFree-Regular.ttf') format('truetype'); font-weight: 400; }
@font-face { font-family: 'Rooyin'; src: url('RooyinFree-Bold.ttf') format('truetype'); font-weight: 700; }

:root {
    --bg-color: #050508;
    --text-color: #f0ece6;
    --accent: #c9a96e;
    --glass-bg: rgba(20, 20, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

body[dir="ltr"] {
    font-family: 'Inter', sans-serif;
    direction: ltr;
}
body[dir="ltr"] .card-text {
    text-align: left;
}
body[dir="ltr"] .hero-title, body[dir="ltr"] .hero-sub {
    font-family: 'Inter', sans-serif;
}
body[dir="ltr"] .social-btn {
    flex-direction: row;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

#webglCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* Energy spline canvas (2D layer above particles for fiber trails) */
#energyCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
}

/* Cinematic white flash overlay on explosion */
#explosionFlash {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: radial-gradient(circle at center, #fff5e0 0%, #c9a96e 40%, transparent 75%);
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* Shockwave ripple ring */
#shockwaveRing {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(201, 169, 110, 0.9);
    box-shadow: 0 0 30px rgba(201, 169, 110, 0.6), inset 0 0 20px rgba(201, 169, 110, 0.2);
    z-index: 199;
    pointer-events: none;
    opacity: 0;
}

/* Background Depth */
.bg-depth {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}
.shape-1 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(201,169,110,0.15) 0%, transparent 70%);
    top: -10%;
    right: -10%;
    animation: float 20s infinite alternate ease-in-out;
}
.shape-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(78,205,196,0.1) 0%, transparent 70%);
    bottom: -20%;
    left: -10%;
    animation: float 25s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(45deg); }
}

/* Navigation */
.nav-glass {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(5,5,8,0.8), transparent);
}
.logo {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    text-shadow: 0 0 20px rgba(201,169,110,0.5);
}
.links { display: flex; gap: 32px; }
.links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.links a:hover { color: var(--accent); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 110;
}

.music-btn {
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.music-btn:hover {
    background: rgba(201, 169, 110, 0.15);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(201, 169, 110, 0.2);
}

.music-btn.playing {
    background: rgba(201, 169, 110, 0.1);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(201, 169, 110, 0.25);
}

.music-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: 17px;
    height: 14px;
}

.bar {
    width: 2px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.music-btn.playing .bar {
    background-color: var(--accent);
}

/* Soundwave animations for visualizer */
@keyframes soundwave-1 {
    0%, 100% { height: 3px; }
    50% { height: 14px; }
}
@keyframes soundwave-2 {
    0%, 100% { height: 4px; }
    50% { height: 10px; }
}
@keyframes soundwave-3 {
    0%, 100% { height: 2px; }
    50% { height: 12px; }
}
@keyframes soundwave-4 {
    0%, 100% { height: 5px; }
    50% { height: 13px; }
}

.music-btn.playing .bar-1 { animation: soundwave-1 0.8s ease-in-out infinite; }
.music-btn.playing .bar-2 { animation: soundwave-2 0.6s ease-in-out infinite 0.15s; }
.music-btn.playing .bar-3 { animation: soundwave-3 0.7s ease-in-out infinite 0.3s; }
.music-btn.playing .bar-4 { animation: soundwave-4 0.5s ease-in-out infinite 0.05s; }

.lang-btn {
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.lang-btn:hover {
    background: rgba(201, 169, 110, 0.15);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(201, 169, 110, 0.2);
}

/* Scroll Container */
.scroll-sequence {
    position: relative;
    height: 1400vh;
    z-index: 10;
}

.sticky-viewport {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.sequence-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.seq-section {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    visibility: hidden;
}

/* Hero Section */
.hero-section {
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    opacity: 1;
    visibility: visible !important;
    pointer-events: none;
}
.hero-text-wrapper {
    max-width: 600px;
    margin-top: 10vh;
    pointer-events: none;
}
.hero-title {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 40px rgba(0,0,0,0.9);
}
.hero-title .accent {
    background: linear-gradient(135deg, #e8c97a 0%, #c9a96e 50%, #f0d89a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
}
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, 0); }
    50% { opacity: 1; transform: translate(-50%, 10px); }
}

/* Content Sections */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    gap: 40px;
    align-items: center;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.05);
    pointer-events: auto; /* Allow all mouse events */
}

.card-img-wrapper {
    flex: 0 0 35%; /* Fixed width for tall aspect ratio */
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9/16;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    pointer-events: auto; /* Ensure wrapper click is registered */
}
.card-img-wrapper img, .card-img-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2);
    pointer-events: none; /* Let clicks pass through to the wrapper */
}

.unmute-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 50;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.3s;
    pointer-events: auto; /* Ensure clickable */
}
.unmute-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.audio-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.audio-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-text {
    flex: 1;
    text-align: right;
}
.card-text h2 {
    font-family: 'Rooyin', sans-serif;
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}
.card-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.7);
}

/* Social Overlay */
.social-overlay {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-family: 'Rooyin', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.social-btn .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--accent);
    background: rgba(201, 169, 110, 0.15);
    box-shadow: 0 15px 40px rgba(201, 169, 110, 0.2);
}

.social-btn.instagram-btn:hover .icon { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-btn.whatsapp-btn:hover .icon { background: #25D366; }

/* About Section — Portrait Photo */
.about-photo-wrapper {
    pointer-events: none;
    overflow: hidden;
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 16px;
    pointer-events: none;
    /* Remove the GSAP scale transform issue */
    transform: none !important;
}

/* Cinematic rim-light glow overlay on top of the photo */
.about-photo-glow {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background:
        linear-gradient(to top, rgba(201,169,110,0.25) 0%, transparent 40%),
        linear-gradient(to right, rgba(201,169,110,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* Subtle animated border glow */
.about-photo-wrapper::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(201,169,110,0.4), transparent 50%, rgba(201,169,110,0.2));
    pointer-events: none;
    z-index: 2;
    animation: portrait-glow 4s ease-in-out infinite alternate;
}

@keyframes portrait-glow {
    0%   { opacity: 0.5; }
    100% { opacity: 1.0; }
}


/* Services Section */
.services-card, .testimonials-card, .contact-card {
    max-width: 900px !important;
}
.section-title {
    text-align: center;
    margin-bottom: 30px !important;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}
.service-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.service-item:hover {
    transform: translateY(-8px);
    background: rgba(201, 169, 110, 0.08);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(201, 169, 110, 0.15);
}
.service-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.service-item h3 {
    font-family: 'Rooyin', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 12px;
}
.service-item p {
    font-size: 0.9rem !important;
    line-height: 1.6;
    color: rgba(255,255,255,0.6) !important;
}

/* Testimonials Section */
.testimonials-slider {
    padding: 20px;
    text-align: center;
}
.testimonial-item {
    max-width: 700px;
    margin: 0 auto;
}
.testimonial-item .quote {
    font-size: 1.4rem !important;
    font-style: italic;
    line-height: 1.8;
    color: rgba(255,255,255,0.9) !important;
    margin-bottom: 24px;
    position: relative;
}
.testimonial-item .author {
    font-family: 'Rooyin', sans-serif;
    font-size: 1.2rem;
    color: var(--accent);
}

/* Contact Section */
.contact-card {
    text-align: center !important;
}
.contact-card .card-text {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.contact-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}
.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    font-family: 'Rooyin', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.1);
}
.wa-btn {
    background: rgba(37, 211, 102, 0.15);
    border-color: #25D366;
}
.wa-btn:hover {
    background: #25D366;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    transform: translateY(-3px);
}
.ig-btn {
    background: rgba(201, 169, 110, 0.15);
    border-color: var(--accent);
}
.ig-btn:hover {
    background: var(--accent);
    box-shadow: 0 10px 25px rgba(201, 169, 110, 0.4);
    transform: translateY(-3px);
}

@media(max-width: 768px) {
    .glass-card {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        max-width: 95%;
    }
    .card-img-wrapper {
        flex: auto;
        width: 100%;
        margin: 0 auto;
    }
    .hero-section {
        align-items: center;
        text-align: center;
        padding-right: 24px;
    }
    .hero-text-wrapper {
        margin-top: 50vh; /* Push text down to make room for canvas particles */
    }
    .nav-glass { padding: 20px; }
    .links { display: none; }
    .nav-actions { gap: 8px; }
    .music-btn {
        padding: 8px 12px;
    }
    .music-btn-text {
        display: none;
    }
    .social-overlay {
        bottom: 20px;
        right: 20px;
        flex-direction: row;
        justify-content: center;
        width: calc(100% - 40px);
    }
    .social-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .contact-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    .testimonial-item .quote {
        font-size: 1.1rem !important;
    }
}
