@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&family=Cairo:wght@400;600;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --gold: #d4af37;
  --gold-light: #f3e5ab;
  --blue: #0f52ba;
  --red: #8b0000;
  --green: #00ff41;
}

* { box-sizing: border-box; border-color: rgba(212,175,55,0.15); }

html { scroll-behavior: smooth; overflow-x: hidden !important; max-width: 100vw; }

body {
  margin: 0;
  background: var(--bg);
  color: #fff;
  font-family: "Tajawal", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
}

h1, h2, h3, h4, .font-head { font-family: "Cairo", sans-serif; }
.font-mono-x { font-family: "Space Mono", monospace; }
img { display: block; max-width: 100%; }
a, button { cursor: pointer; }

::selection { background: var(--gold); color: #000; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold), var(--red)); border-radius: 10px; }

/* ===== Utilities ===== */
.perspective-1000 { perspective: 1200px; }
.transform-style-3d { transform-style: preserve-3d; }
.backface-hidden { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rotate-y-180 { transform: rotateY(180deg); }

.text-gradient-gold {
  color: #d4af37 !important;
  background-image: linear-gradient(120deg, #f3e5ab, #d4af37 40%, #8b6b1f 55%, #f3e5ab 70%) !important;
  background-size: 220% auto !important;
  -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important;
  animation: shine 4.5s linear infinite;
}
.heading-shine {
  color: #fff !important;
  background-image: linear-gradient(110deg, #ffffff 0%, #ffffff 38%, #f3e5ab 48%, #d4af37 52%, #ffffff 62%, #ffffff 100%) !important;
  background-size: 220% auto !important;
  -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important;
  animation: shine 5s linear infinite;
}
h1, h2, h3, h4, .font-head { color: #fff !important; }
@keyframes shine { to { background-position: -220% center; } }

.glass { background: rgba(255,255,255,0.03); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(212,175,55,0.15); }

.grain { position: relative; }
.grain::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Rotating gold beam border - buttons ===== */
.beam-btn { position: relative; isolation: isolate; border-radius: 9999px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem 2rem; font-size: 0.95rem; font-weight: 700; color: #f3e5ab; font-family: "Cairo", sans-serif; transition: transform 0.3s; }
.beam-btn:hover { transform: scale(1.04); }
.beam-btn:active { transform: scale(0.95); }
.beam-btn::before { content: ""; position: absolute; inset: -150%; background: conic-gradient(from 0deg, transparent 0deg, transparent 300deg, #f3e5ab 340deg, #d4af37 360deg); animation: beam-spin 3s linear infinite; z-index: -2; }
.beam-btn::after { content: ""; position: absolute; inset: 2px; border-radius: 9999px; background: #0a0a06; z-index: -1; }
@keyframes beam-spin { to { transform: rotate(360deg); } }
.beam-btn.beam-wa::after { background: #6b0000; }
.beam-btn.beam-wa { color: #fff; padding: 0.85rem 1.6rem; }
.beam-btn .btn-inner { position: relative; z-index: 10; display: flex; align-items: center; gap: 0.5rem; }

/* ===== Rotating gold beam border - cards ===== */
@property --beam-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.beam-card { position: relative; border-radius: 1.1rem; }
.beam-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px;
  background: conic-gradient(from var(--beam-angle), transparent 0deg, transparent 280deg, rgba(243,229,171,0.95) 330deg, #d4af37 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: beam-rotate 4s linear infinite; pointer-events: none; z-index: 5;
}
@keyframes beam-rotate { to { --beam-angle: 360deg; } }

.gold-glow { box-shadow: 0 0 30px rgba(212,175,55,0.25), 0 0 60px rgba(212,175,55,0.1); }
.blue-glow { box-shadow: 0 0 40px rgba(15,82,186,0.3); }

/* ===== Icons ===== */
.icon-svg { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; fill: none; stroke: currentColor; flex-shrink: 0; }
.icon-svg.filled { fill: currentColor; stroke: none; }

/* ===== Navbar ===== */
.navbar { position: fixed; top: 0; inset-inline: 0; z-index: 50; background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-bottom: none !important; }
.nav-link { position: relative; font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.75); padding: 0.5rem 0; transition: color 0.3s; }
.nav-link:hover { color: var(--gold); }
.nav-link::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; height: 1px; width: 0; background: var(--gold); transition: width 0.3s; }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.lang-toggle { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 700; color: var(--gold); border: 1px solid rgba(212,175,55,0.4); border-radius: 9999px; padding: 0.375rem 0.75rem; transition: background-color 0.3s, color 0.3s; background: transparent; }
.lang-toggle:hover { background: var(--gold); color: #000; }
.mobile-menu { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.35s ease, opacity 0.35s ease; background: rgba(0,0,0,0.95); backdrop-filter: blur(20px); border-top: 1px solid rgba(212,175,55,0.1); }
.mobile-menu.open { max-height: 600px; opacity: 1; }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }

/* ===== Hero line-mask entrance ===== */
.hero-line-mask { display: block; overflow: hidden; }
.hero-line { display: block; transform: translateY(110%); animation: heroLineIn 0.8s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes heroLineIn { to { transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hero-fade { opacity: 0; animation: fadeInUp 0.7s ease forwards; }

/* ===== Marquee ===== */
.marquee-wrap { position: relative; overflow: hidden; padding: 1.5rem 0; }
.marquee-track { display: flex; white-space: nowrap; width: max-content; animation: marquee 28s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  margin: 0 2rem; font-family: "Cairo", sans-serif; font-size: 1.875rem; font-weight: 900;
  display: flex; align-items: center; gap: 2rem;
  color: #d4af37 !important;
  background-image: linear-gradient(120deg, #f3e5ab, #d4af37 40%, #8b6b1f 55%, #f3e5ab 70%) !important;
  background-size: 220% auto !important;
  -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important;
  animation: shine 4.5s linear infinite;
}
@media (min-width: 768px) { .marquee-item { font-size: 3rem; } }
.marquee-dot { width: 10px; height: 10px; border-radius: 999px; background: rgba(212,175,55,0.7); -webkit-text-fill-color: initial; }

/* ===== Flip cards ===== */
.flip-card { height: 360px; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.7s; transform-style: preserve-3d; }
.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 1rem; }
.flip-front { overflow: hidden; border: 1px solid rgba(212,175,55,0.2); }
.flip-front .bg-wrap { position: absolute; inset: 0; }
.flip-front .bg-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.flip-front .bg-shade { position: absolute; inset: 0; background: linear-gradient(to top, #000, rgba(0,0,0,0.7), rgba(0,0,0,0.2)); }
.flip-front .content { position: relative; z-index: 10; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.75rem; }
.flip-back { transform: rotateY(180deg); border: 1px solid rgba(139,0,0,0.6); background: #120404; padding: 1.75rem; display: flex; flex-direction: column; justify-content: space-between; }

/* ===== Carousel 3D ===== */
.carousel-stage { position: relative; height: 300px; perspective: 1200px; display: flex; align-items: center; justify-content: center; }
@media (min-width: 768px) { .carousel-stage { height: 440px; } }
.carousel-item { position: absolute; width: 80%; height: 100%; transition: all 0.7s ease-out; cursor: pointer; border-radius: 1.1rem; overflow: hidden; }
@media (min-width: 768px) { .carousel-item { width: 55%; } }
.carousel-item:not(.active) { border: 1px solid rgba(212,175,55,0.2); }
.carousel-item .inner { position: relative; width: 100%; height: 100%; border-radius: 1rem; overflow: hidden; }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; }
.carousel-item .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent, transparent); }
.carousel-item .caption { position: absolute; bottom: 0; inset-inline: 0; padding: 1.5rem; }
.carousel-nav-btn { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; color: var(--gold); transition: background-color 0.3s, color 0.3s; }
.carousel-nav-btn:hover { background: var(--gold); color: #000; }
.carousel-dot { height: 8px; border-radius: 999px; transition: all 0.3s; background: rgba(255,255,255,0.2); width: 8px; }
.carousel-dot.active { width: 32px; background: var(--gold); }

/* ===== Matrix rain canvas ===== */
.matrix-canvas-wrap { position: absolute; inset: 0; }
.matrix-canvas-wrap canvas { display: block; width: 100%; height: 100%; }

/* ===== Hero 3D canvas ===== */
.hero3d-wrap { position: absolute; inset: 0; }
.hero3d-wrap canvas { display: block; width: 100% !important; height: 100% !important; }

/* ===== Hero loader ===== */
.hero-loader { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: #050505; transition: opacity 0.8s ease; }
.hero-loader.hidden-loader { opacity: 0; pointer-events: none; }
.hero-loader-diamond { position: relative; width: 80px; height: 80px; }
.hero-loader-diamond .ring1 { position: absolute; inset: 0; border: 2px solid rgba(212,175,55,0.2); transform: rotate(45deg); border-radius: 4px; }
.hero-loader-diamond .ring2 { position: absolute; inset: 0; border: 2px solid transparent; border-top-color: var(--gold); border-radius: 4px; animation: loaderSpin 1.4s linear infinite; }
@keyframes loaderSpin { from { transform: rotate(45deg); } to { transform: rotate(405deg); } }
.hero-loader-diamond .core { position: absolute; inset: 16px; transform: rotate(45deg); border-radius: 4px; background: linear-gradient(135deg, #f3e5ab, #d4af37 55%, #8b6b1f); animation: loaderPulse 1.6s ease-in-out infinite; }
@keyframes loaderPulse { 0%, 100% { transform: rotate(45deg) scale(0.7); opacity: 0.45; } 50% { transform: rotate(45deg) scale(1); opacity: 1; } }
.hero-loader-bar { width: 176px; height: 2px; background: rgba(255,255,255,0.1); overflow: hidden; border-radius: 999px; position: relative; margin-top: 1.75rem; }
.hero-loader-bar .fill { position: absolute; top: 0; height: 100%; width: 50%; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: loaderBar 1.2s ease-in-out infinite; }
@keyframes loaderBar { from { transform: translateX(-100%); } to { transform: translateX(220%); } }

/* ===== WhatsApp FAB ===== */
.wa-fab { position: fixed; bottom: 1.5rem; inset-inline-start: 1.5rem; z-index: 50; width: 56px; height: 56px; border-radius: 999px; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 0 25px rgba(139,0,0,0.6); transition: transform 0.3s; }
.wa-fab:hover { transform: scale(1.1); }
.wa-fab .ping { position: absolute; inset: 0; border-radius: 999px; background: var(--red); animation: waPing 2s cubic-bezier(0,0,0.2,1) infinite; opacity: 0.3; }
@keyframes waPing { 75%, 100% { transform: scale(1.6); opacity: 0; } }

/* ===== Contact form inputs ===== */
.form-input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 0.75rem; padding: 0.75rem 1rem; color: #fff; transition: border-color 0.3s; }
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-input:focus { border-color: var(--gold); outline: none; }
.form-input option { background: #000; }

/* ===== Toast ===== */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { font-family: "Tajawal", sans-serif; padding: 14px 22px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); animation: toastIn .25s ease; }
.toast.success { background: #10B981; color: #04231a; }
.toast.error { background: #ef4444; color: #2a0808; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Page fade-in (route transition replacement) ===== */
.page-enter { animation: pageEnter 0.6s cubic-bezier(.22,1,.36,1); }
@keyframes pageEnter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ===== 3D rotating gallery (pure CSS hexagonal prism) ===== */
.adx-hex-scene {
    position: relative;
    width: 100%;
    height: 420px;
    perspective: 1600px;
    -webkit-perspective: 1600px;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 767px) { .adx-hex-scene { height: 320px; } }

.adx-hex-scale-wrap { transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
@media (max-width: 767px) {
    .adx-hex-scale-wrap { transform: scale(0.72); -webkit-transform: scale(0.72); }
}

.adx-hex-spinner {
    position: relative;
    width: 220px;
    height: 300px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    animation: adxHexSpin 32s linear infinite;
}

.adx-hex-face {
    position: absolute;
    top: 0; left: 0;
    width: 220px; height: 300px;
    border-radius: 16px;
    overflow: hidden;
    border: 1.5px solid rgba(212, 175, 55, 0.55);
    box-shadow: 0 0 26px rgba(212, 175, 55, 0.25), inset 0 0 28px rgba(0, 0, 0, 0.35);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}
.adx-hex-face img { width: 100%; height: 100%; object-fit: cover; }
.adx-hex-face .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,5,5,0.6), transparent 55%); }

@keyframes adxHexSpin {
    from { transform: rotateX(-7deg) rotateY(0deg); }
    to { transform: rotateX(-7deg) rotateY(360deg); }
}

.adx-hex-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(212, 175, 55, 0.18); pointer-events: none; }
.adx-hex-ring-1 { width: 440px; height: 440px; animation: adxHexPulse 6s ease-in-out infinite; }
.adx-hex-ring-2 { width: 340px; height: 340px; border-color: rgba(15, 82, 186, 0.22); animation: adxHexPulse 6s ease-in-out infinite 1.5s; }
@keyframes adxHexPulse { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.08); opacity: 0.9; } }
