/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #010101;
  --purple: #983AD6;
  --pink: #FA93FA;
  --lilac: #C967E8;
  --white: #fff;
  --white-60: #ffffff99;
  --white-80: #ffffffcc;
  --white-10: #ffffff1a;
  --white-05: #ffffff0d;
  --gradient: linear-gradient(135deg, #983AD6, #C967E8, #FA93FA);
  --font: 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }

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

/* RTL support */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .nav-links { direction: rtl; }

/* Typography */
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 600; line-height: 1.2; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; line-height: 1.3; }
p { color: var(--white-80); }

/* Utility */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section { padding: 100px 0; }

/* Navigation */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  background: rgba(1, 1, 1, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--white-05);
  transition: padding 0.3s;
}

nav.scrolled { padding: 12px 0; }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}

.nav-logo img { height: 32px; }

.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--white-60); text-decoration: none;
  font-size: 0.9rem; font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

/* Language selector */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-btn {
  background: var(--white-10);
  border: 1px solid var(--white-10);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}

.lang-btn:hover { background: var(--white-10); border-color: var(--lilac); }

.lang-btn svg { width: 12px; height: 12px; transition: transform 0.2s; }
.lang-selector.open .lang-btn svg { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #1a1a2e;
  border: 1px solid var(--white-10);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

[dir="rtl"] .lang-dropdown { right: auto; left: 0; }

.lang-selector.open .lang-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.lang-option {
  display: block; width: 100%;
  background: none; border: none;
  color: var(--white-60);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 0.85rem;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

[dir="rtl"] .lang-option { text-align: right; }

.lang-option:hover { background: var(--white-05); color: var(--white); }
.lang-option.active { color: var(--lilac); background: rgba(152, 58, 214, 0.15); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(1,1,1,0.4) 0%, rgba(1,1,1,0.9) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 800px;
}

.hero-tagline {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--lilac);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.hero h1 { margin-bottom: 24px; }

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 40px;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gradient);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none; cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(152, 58, 214, 0.4);
}

/* Value Cards */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.value-card {
  background: var(--white-05);
  border: 1px solid var(--white-10);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.2s, border-color 0.2s;
}

.value-card:hover {
  transform: translateY(-4px);
  border-color: var(--lilac);
}

.value-card .icon {
  width: 48px; height: 48px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.value-card h3 { margin-bottom: 12px; }
.value-card p { font-size: 0.9rem; }

/* Mission */
.mission { background: linear-gradient(180deg, var(--bg) 0%, #0a0a1a 50%, var(--bg) 100%); }

.mission-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.mission-intro { font-size: 1.1rem; margin-bottom: 8px; color: var(--white-80); }

.mission-points { display: flex; flex-direction: column; gap: 24px; margin-top: 8px; }

.mission-point {
  padding: 24px;
  background: var(--white-05);
  border-radius: 12px;
  border-left: 3px solid var(--lilac);
  font-size: 0.95rem;
  color: var(--white-80);
}

[dir="rtl"] .mission-point { border-left: none; border-right: 3px solid var(--lilac); }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.service-card {
  background: var(--white-05);
  border: 1px solid var(--white-10);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.2s;
}

.service-card:hover { transform: translateY(-4px); }
.service-card:hover::before { opacity: 1; }

.service-card .icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.service-card h3 { margin-bottom: 12px; }
.service-card p { font-size: 0.9rem; }

/* Expertise */
.expertise { background: linear-gradient(180deg, var(--bg) 0%, #0a0a1a 50%, var(--bg) 100%); }

.expertise-intro {
  max-width: 800px;
  font-size: 1.05rem;
  margin-top: 20px;
  margin-bottom: 48px;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.audience-card {
  background: var(--white-05);
  border: 1px solid var(--white-10);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.2s;
}

.audience-card:hover { border-color: var(--lilac); }
.audience-card h3 { margin-bottom: 12px; color: var(--lilac); }
.audience-card p { font-size: 0.9rem; }

/* CTA */
.cta {
  text-align: center;
  padding: 120px 0;
  background: radial-gradient(ellipse at center, rgba(152, 58, 214, 0.15) 0%, transparent 70%);
}

.cta h2 { margin-bottom: 20px; }
.cta p { max-width: 700px; margin: 0 auto 40px; font-size: 1.05rem; }
.cta .tagline { font-size: 0.9rem; color: var(--lilac); margin-top: 24px; }

/* Footer */
footer {
  border-top: 1px solid var(--white-10);
  padding: 40px 0;
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
}

.footer-logo img { height: 28px; }
.footer-copy { font-size: 0.8rem; color: var(--white-60); }

/* Scroll offset for anchor links (compensate sticky nav) */
.section, .cta { scroll-margin-top: 80px; }

/* Mobile controls */
.mobile-controls {
  display: none;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  background: none; border: none; cursor: pointer;
  padding: 12px;
  min-width: 48px; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
}

.mobile-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--white);
  margin: 4px 0;
  transition: all 0.3s;
  border-radius: 2px;
  pointer-events: none;
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 4px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -4px); }

/* Responsive */
@media (max-width: 768px) {
  /* Full-screen menu: 100% opaque, items top-aligned */
  .nav-links {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    background: #000 !important;
    padding: 90px 32px 32px;
    gap: 0;
    z-index: 9999 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li { list-style: none; }

  .nav-links a {
    display: block;
    padding: 18px 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--white);
    border-bottom: 1px solid var(--white-10);
    text-decoration: none;
  }

  .nav-links li:last-child a { border-bottom: none; }

  .nav-links a:active { color: var(--lilac); }

  /* Language selector at bottom of mobile menu */
  .nav-links .lang-selector {
    margin-top: 32px;
    width: 100%;
  }

  .nav-links .lang-btn {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1rem;
    min-height: 52px;
    border-radius: 12px;
  }

  .nav-links .lang-dropdown {
    position: static;
    width: 100%;
    margin-top: 12px;
    transform: none;
    box-shadow: none;
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: 12px;
    padding: 8px;
    max-height: none;
    overflow-y: visible;
  }

  .nav-links .lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
  }

  .nav-links .lang-option {
    padding: 14px 16px;
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .mobile-controls { display: flex; z-index: 10001; position: relative; }

  /* Nav bar stays on top of fullscreen menu */
  nav { z-index: 10000 !important; }

  .section { padding: 64px 0; }

  .mission-content { grid-template-columns: 1fr; gap: 32px; }

  .values-grid, .services-grid { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }

  .value-card, .service-card, .audience-card { padding: 24px; }

  .cta { padding: 80px 0; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .footer-logo img { height: 32px; min-height: 48px; object-fit: contain; }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }

  .hero { min-height: 100vh; min-height: 100dvh; padding-top: 100px; }
  .hero p { font-size: 1rem; }
  .btn-primary { width: 100%; justify-content: center; padding: 16px 24px; font-size: 1rem; }
}

@media (max-width: 380px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.9rem; }
  .nav-links a { font-size: 1.2rem; padding: 16px 0; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
