/**
 * MASTER BASE STYLES & ATMOSPHERIC CANVAS
 * Typography, Reset, Cosmic Background, Custom Cursor & Utilities
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Syne:wght@700;800;900&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

html[lang="en"] body {
  font-family: var(--font-latin);
}

body.modal-open,
body.drawer-open {
  overflow: hidden;
}

/* Cosmic Nebula Atmosphere */
.universe-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.ambient-nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  animation: floatNebula 24s ease-in-out infinite alternate;
}

.nebula-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
  top: -150px;
  right: -100px;
}

.nebula-2 {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
  bottom: 10%;
  left: -200px;
  animation-duration: 32s;
  animation-delay: -8s;
}

.nebula-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  top: 50%;
  right: 20%;
  opacity: 0.12;
  animation-duration: 28s;
  animation-delay: -16s;
}

@keyframes floatNebula {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -60px, 0) scale(1.08); }
  100% { transform: translate3d(-30px, 40px, 0) scale(0.95); }
}

/* Subtle Film Noise Texture */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
  z-index: -1;
}

/* Custom Interactive Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.3s ease, border-color 0.2s ease, background-color 0.2s ease;
  display: none;
}

@media (pointer: fine) {
  .custom-cursor {
    display: block;
  }
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-gold);
  margin-top: -3px;
  margin-left: -3px;
  box-shadow: 0 0 10px var(--accent-gold);
}

.cursor-dot.dot-hidden {
  opacity: 0;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(229, 184, 105, 0.45);
  margin-top: -19px;
  margin-left: -19px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), margin 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, background-color 0.3s ease;
}

.cursor-ring.cursor-active {
  width: 64px;
  height: 64px;
  margin-top: -32px;
  margin-left: -32px;
  border-color: var(--accent-gold);
  background-color: rgba(229, 184, 105, 0.08);
  backdrop-filter: blur(2px);
}

.cursor-ring.cursor-clicking {
  transform: scale(0.85);
  border-color: var(--accent-gold-light);
  background-color: rgba(229, 184, 105, 0.2);
}

.cursor-glow {
  width: 240px;
  height: 240px;
  margin-top: -120px;
  margin-left: -120px;
  background: radial-gradient(circle, rgba(229, 184, 105, 0.08) 0%, transparent 70%);
  opacity: 0.6;
}

/* Container & Grid Setup */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}

/* Typography Helpers */
.gold-gradient {
  background: linear-gradient(135deg, #ffffff 10%, var(--accent-gold-light) 60%, var(--accent-gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-head {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head.text-center {
  text-align: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  background: rgba(229, 184, 105, 0.08);
  border: 1px solid rgba(229, 184, 105, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-gold);
  margin-bottom: 16px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Links & Interactive Helpers */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
