/* ============================================
   PRINCESS MEDIA — Styles v2
   Pink/Magenta theme + RTL support
   ============================================ */

:root {
    --bg: #0a0a0a;
    --bg-light: #EDEDED;
    --text: #ffffff;
    --text-sec: #a0a0a0;
    --text-dark: #1a1a1a;
    --primary: #D11F5F;
    --primary-light: #FF6B9D;
    --primary-dark: #4A0E2E;
    --glow: rgba(209, 31, 95, 0.45);
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

/* CLS Prevention: Prevent jumping when JS loads */
[data-en][data-ar] {
    min-height: 1.2em;
    display: inline-block;
}

html[lang="ar"] body {
    text-align: right;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* RTL mode */
html[dir="rtl"] body { font-family: 'Noto Kufi Arabic', var(--font-body); }
html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-heading h2,
html[dir="rtl"] .cta-heading,
html[dir="rtl"] .about-text-large p,
html[dir="rtl"] .service-title,
html[dir="rtl"] .stat-number,
html[dir="rtl"] .footer-logo,
html[dir="rtl"] .footer-large-text { font-family: 'Noto Kufi Arabic', var(--font-main); }

a { text-decoration: none; color: inherit; transition: color 0.4s var(--ease); }
img { max-width: 100%; display: block; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 40px; }
.section { padding: 120px 0; position: relative; }

/* ========== PRELOADER (Pure CSS animation) ========== */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: preloaderFadeOut 0.8s ease 3s forwards;
}

@keyframes preloaderFadeOut {
    0% { opacity: 1; pointer-events: all; }
    99% { opacity: 0; pointer-events: none; }
    100% { opacity: 0; pointer-events: none; display: none; visibility: hidden; }
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.preloader-logo-wrap {
    width: 90px;
    height: 90px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.preloader-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    font-size: 64px;
    font-weight: 800;
    color: var(--primary);
    z-index: 2;
    mix-blend-mode: difference;
}

.preloader-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--primary);
    animation: preloaderFillUp 2.4s ease-out 0.3s forwards;
}

@keyframes preloaderFillUp {
    0% { height: 0%; }
    100% { height: 100%; }
}

.preloader-bar-track {
    width: 120px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    animation: preloaderBarFill 2.6s ease-out 0.2s forwards;
}

@keyframes preloaderBarFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ========== GLOW BORDERS ========== */
.glow-border {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease 3.6s;
}
.glow-border.active { opacity: 1; }
.glow-top { top:0; left:0; right:0; height:2px; background:var(--primary); box-shadow:0 0 30px 10px var(--glow); }
.glow-bottom { bottom:0; left:0; right:0; height:2px; background:var(--primary); box-shadow:0 0 30px 10px var(--glow); }
.glow-left { top:0; bottom:0; left:0; width:2px; background:var(--primary); box-shadow:0 0 30px 10px var(--glow); }
.glow-right { top:0; bottom:0; right:0; width:2px; background:var(--primary); box-shadow:0 0 30px 10px var(--glow); }

/* ========== NAVIGATION ========== */
#main-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 9999;
    padding: 24px 0;
    transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}
#main-nav.scrolled {
    background: rgba(10,10,10,0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-text {
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.nav-logo-img { height: 35px; width: auto; object-fit: contain; transition: opacity 0.3s; vertical-align: middle; }
.logo-accent { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    padding: 4px 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.4s var(--ease);
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--primary); }

.nav-right { display: flex; align-items: center; gap: 20px; }

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-sec);
    transition: border-color 0.3s, color 0.3s;
}
.lang-toggle:hover { border-color: var(--primary); }
.lang-option { transition: color 0.3s; cursor: pointer; }
.lang-option.active { color: var(--primary); font-weight: 600; }
.lang-divider { color: rgba(255,255,255,0.2); }

.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
}
.menu-line {
    width: 28px; height: 2px;
    background: var(--text);
    transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.nav-menu-btn.active .menu-line:first-child { transform: rotate(45deg) translate(3px, 3px); }
.nav-menu-btn.active .menu-line:last-child { transform: rotate(-45deg) translate(3px, -3px); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s var(--ease);
}
.mobile-menu.active { opacity: 1; pointer-events: all; }
.mobile-menu-links { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.mobile-link {
    font-family: var(--font-main);
    font-size: 42px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s;
}
.mobile-menu.active .mobile-link { opacity: 1; transform: translateY(0); }
.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: .1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: .15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: .2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: .25s; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: .3s; }
.mobile-link:hover { color: var(--primary); }

/* ========== HERO ========== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}
#hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -30%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    opacity: 0.3;
    animation: glow 8s ease-in-out infinite alternate;
}
html[dir="rtl"] #hero::before { right: auto; left: -30%; }
@keyframes glow { 0%{transform:translate(0,0)scale(1)} 100%{transform:translate(-100px,80px)scale(1.2)} }

.hero-grid { max-width: 1400px; margin: 0 auto; padding: 0 40px; width: 100%; }
.hero-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 60px;
    gap: 20px;
}
.hero-meta { display: flex; gap: 40px; }
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-label { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-sec); }
.meta-value { font-size: 14px; font-weight: 500; }
.hero-philosophy { max-width: 300px; }
.philosophy-text { font-size: 14px; color: var(--text-sec); line-height: 1.7; }
.hero-status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-sec); }
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100%{opacity:1; box-shadow:0 0 0 0 rgba(34,197,94,0.4)}
    50%{opacity:0.8; box-shadow:0 0 0 8px rgba(34,197,94,0)}
}

.hero-headline { margin-bottom: 60px; }
.hero-title {
    font-family: var(--font-main);
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -3px;
}
html[dir="rtl"] .hero-title { letter-spacing: 0; line-height: 1.15; }

.title-line { display: block; overflow: hidden; }
.accent-line { color: var(--primary); font-style: italic; }
html[dir="rtl"] .accent-line { font-style: normal; }

.hero-bottom-row { display: flex; justify-content: space-between; align-items: flex-end; }
.tagline-secondary { font-size: 18px; color: var(--text-sec); font-weight: 300; }
html[dir="rtl"] .tagline-secondary { direction: ltr; }
.hero-scroll-indicator { display: flex; align-items: center; gap: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-sec); }
.scroll-line {
    width: 60px; height: 1px;
    background: var(--text-sec);
    position: relative; overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--primary);
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 0%{left:-100%} 100%{left:100%} }

/* ========== SECTION LABELS & HEADINGS ========== */
.section-label {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; text-transform: uppercase; letter-spacing: 3px;
    color: var(--text-sec);
    margin-bottom: 60px;
}
.label-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.label-dot.dark { background: var(--primary-dark); }
.dark-text { color: var(--text-dark); }
.section-heading { margin-bottom: 80px; }
.section-heading h2 {
    font-family: var(--font-main);
    font-size: clamp(36px, 5vw, 72px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
}
html[dir="rtl"] .section-heading h2 { letter-spacing:0; }
.heading-accent { color: var(--primary); font-style: italic; }
html[dir="rtl"] .heading-accent { font-style: normal; }

/* ========== ABOUT ========== */
.about-content { margin-bottom: 80px; }
.about-text-large { margin-bottom: 48px; }
.about-text-large p {
    font-family: var(--font-main);
    font-size: clamp(24px, 3.5vw, 48px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -1px;
}
html[dir="rtl"] .about-text-large p { letter-spacing: 0; line-height: 1.5; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-detail p { font-size: 16px; color: var(--text-sec); line-height: 1.8; }
.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.stat-item { text-align: center; }
.stat-number {
    font-family: var(--font-main);
    font-size: 72px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    display: inline;
}
.stat-suffix { font-family: var(--font-main); font-size: 48px; font-weight: 800; color: var(--primary); }
.stat-label {
    display: block;
    font-size: 14px;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 12px;
}

/* ========== SERVICES (Light bg) ========== */
.section-light { background: var(--bg-light); color: var(--text-dark); }
.services-list { display: flex; flex-direction: column; }
.service-item {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: 40px;
    padding: 36px 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    transition: padding 0.4s var(--ease);
}
.service-item:first-child { border-top: 1px solid rgba(0,0,0,0.1); }
.service-item:hover { padding-inline-start: 20px; }
.service-item:hover .service-arrow { transform: translateX(8px); color: var(--primary); }
html[dir="rtl"] .service-item:hover .service-arrow { transform: translateX(-8px); }
.service-item:hover .service-number { color: var(--primary); }
.service-number {
    font-family: var(--font-main);
    font-size: 48px;
    font-weight: 800;
    color: rgba(0,0,0,0.12);
    transition: color 0.4s var(--ease);
}
.service-title {
    font-family: var(--font-main);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
html[dir="rtl"] .service-title { letter-spacing: 0; }
.service-desc { font-size: 14px; color: rgba(0,0,0,0.5); line-height: 1.6; max-width: 500px; }
.service-arrow {
    font-size: 24px;
    color: rgba(0,0,0,0.3);
    transition: transform 0.4s var(--ease), color 0.4s var(--ease);
    text-align: end;
}
html[dir="rtl"] .service-arrow { transform: scaleX(-1); }

/* ========== WORKS ========== */
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.work-card { cursor: pointer; overflow: hidden; border-radius: 12px; }
.work-image { overflow: hidden; border-radius: 12px; }
.work-image-placeholder {
    aspect-ratio: 16/11;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 24px;
    transition: transform 0.8s var(--ease);
}
html[dir="rtl"] .work-image-placeholder { justify-content: flex-end; }
.work-card:hover .work-image-placeholder { transform: scale(1.05); }
.work-image-label {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}
.work-info { padding: 20px 0; }
.work-title {
    font-family: var(--font-main);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
html[dir="rtl"] .work-title { letter-spacing: 0; }
.work-category { font-size: 14px; color: var(--text-sec); }

/* ========== CLIENTS MARQUEE ========== */
.clients-marquee { overflow: hidden; margin-top: 60px; padding: 40px 0; }
.marquee-track {
    display: flex;
    gap: 40px;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}
html[dir="rtl"] .marquee-track { animation-direction: reverse; }
.client-name {
    font-family: var(--font-main);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    opacity: 0.6;
    transition: opacity 0.3s;
}
.client-name:hover { opacity: 1; }
.client-logo { height: 40px; max-width: 150px; object-fit: contain; opacity: 0.6; transition: opacity 0.3s; margin: 0 10px; }
.client-logo:hover { opacity: 1; }
.client-box img { max-height: 60px; max-width: 100%; object-fit: contain; }
.client-sep { color: var(--primary); font-size: 18px; display: flex; align-items: center; }
@keyframes marquee { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ========== CTA ========== */
.cta-container { text-align: center; padding: 80px 0; }
.cta-heading {
    font-family: var(--font-main);
    font-size: clamp(48px, 7vw, 100px);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 32px;
}
html[dir="rtl"] .cta-heading { letter-spacing: 0; line-height: 1.2; }
.cta-sub { font-size: 18px; color: var(--text-sec); margin-bottom: 48px; max-width: 400px; margin-left: auto; margin-right: auto; }
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 20px 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 60px;
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.cta-button::before {
    content: '';
    position: absolute;
    top:0; left:-100%;
    width:100%; height:100%;
    background: var(--primary-dark);
    transition: left 0.6s var(--ease);
}
.cta-button:hover::before { left: 0; }
.cta-button:hover { transform: scale(1.05); box-shadow: 0 0 50px var(--glow); }
.btn-text, .btn-icon { position: relative; z-index: 1; }
.btn-icon { transition: transform 0.4s var(--ease); }
.cta-button:hover .btn-icon { transform: translateX(6px); }
html[dir="rtl"] .cta-button:hover .btn-icon { transform: translateX(-6px); }
html[dir="rtl"] .btn-icon { transform: scaleX(-1); }

/* ========== FOOTER ========== */
footer { border-top: 1px solid rgba(255,255,255,0.08); }
.footer-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; gap:60px; margin-bottom:80px; }
.footer-logo { font-family:var(--font-main); font-size:28px; font-weight:700; display:block; margin-bottom:16px; }
.footer-tagline { font-size:14px; color:var(--text-sec); line-height:1.6; margin-bottom:8px; }
.footer-tagline-secondary { font-size:14px; color:var(--text-sec); }
html[dir="rtl"] .footer-tagline-secondary { direction: ltr; }
.footer-heading { font-family:var(--font-main); font-size:14px; font-weight:600; text-transform:uppercase; letter-spacing:2px; margin-bottom:20px; }
.footer-list { list-style:none; display:flex; flex-direction:column; gap:10px; }
.footer-list li, .footer-list li a { font-size:14px; color:var(--text-sec); transition: color 0.3s; }
.footer-list li a:hover { color: var(--primary); }
.footer-bottom {
    border-top:1px solid rgba(255,255,255,0.08);
    padding-top:40px;
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
}
.footer-large-text {
    font-family:var(--font-main);
    font-size:clamp(60px,10vw,160px);
    font-weight:900;
    line-height:0.85;
    letter-spacing:-4px;
    opacity:0.1;
}
html[dir="rtl"] .footer-large-text { letter-spacing: 0; }
.footer-copyright {
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:4px;
    font-size:13px;
    color:var(--text-sec);
}
html[dir="rtl"] .footer-copyright { align-items: flex-start; }

/* ========== 3D PARALLAX UTILITIES ========== */
.tilt-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
}
.tilt-3d-inner {
    transform: translateZ(30px);
    display: block;
    will-change: transform;
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width:1024px) {
    .container, .nav-container, .hero-grid { padding:0 24px; }
    .section { padding:80px 0; }
    .about-grid { grid-template-columns:1fr; }
    .about-stats { gap:24px; }
    .stat-number { font-size:56px; }
    .footer-grid { grid-template-columns:1fr 1fr; gap:40px; }
}
@media (max-width:768px) {
    .nav-links { display:none; }
    .nav-menu-btn { display:flex; }
    .hero-top-row { flex-direction:column; gap:16px; margin-bottom:40px; }
    .hero-meta { gap:24px; }
    .hero-title { font-size:clamp(36px,10vw,64px); letter-spacing:-2px; }
    html[dir="rtl"] .hero-title { letter-spacing: 0; }
    .hero-bottom-row { flex-direction:column; gap:24px; align-items:flex-start; }
    .about-stats { grid-template-columns:1fr; gap:32px; }
    .service-item { grid-template-columns:50px 1fr 40px; gap:16px; padding:24px 0; }
    .service-number { font-size:32px; }
    .service-title { font-size:18px; }
    .works-grid { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; gap:32px; }
    .footer-bottom { flex-direction:column-reverse; align-items:flex-start; gap:24px; }
    .footer-copyright { align-items:flex-start; }
    .client-name { font-size:20px; }
}
@media (max-width:480px) {
    .container, .nav-container, .hero-grid { padding:0 16px; }
    .section { padding:60px 0; }
    .hero-title { font-size:clamp(28px,9vw,48px); }
    .cta-heading { font-size:clamp(36px,10vw,64px); }
}
