@import "tailwindcss";

/* ============================================================
   CSS VARIABLES — Light (default) & Dark
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-main:          #f0f9ff;
  --bg-gradient:      linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 45%, #ede9fe 100%);
  --surface:          rgba(255, 255, 255, 0.75);
  --surface-hover:    rgba(255, 255, 255, 0.95);
  --surface-dark:     rgba(255, 255, 255, 0.9);
  --card-shadow:      0 2px 24px rgba(0, 0, 0, 0.07);
  --card-shadow-hover:0 12px 40px rgba(0, 0, 0, 0.12);

  /* Text */
  --text-heading:     #0f172a;
  --text-body:        #475569;
  --text-muted:       #94a3b8;
  --text-subtle:      #cbd5e1;

  /* Borders */
  --border:           rgba(0, 0, 0, 0.08);
  --border-hover:     rgba(0, 0, 0, 0.15);
  --border-stat:      rgba(0, 0, 0, 0.10);

  /* Orbs */
  --orb1: rgba(6,  182, 212, 0.18);
  --orb2: rgba(99, 102, 241, 0.14);
  --orb3: rgba(139, 92, 246, 0.10);
  --orb4: rgba(245,158,  11, 0.09);
  --grid: rgba(0, 0, 0, 0.03);

  /* Navbar */
  --navbar-scrolled:  rgba(240, 249, 255, 0.8);

  /* Inputs */
  --input-bg:         rgba(0, 0, 0, 0.03);
  --input-border:     rgba(0, 0, 0, 0.09);
  --input-focus-bg:   rgba(6, 182, 212, 0.04);

  /* Scroll indicator */
  --scroll-line:      rgba(15, 23, 42, 0.25);

  /* Particles */
  --particle-color:   rgba(15, 23, 42, 0.2);
}

html.dark {
  --bg-main:          #020617;
  --bg-gradient:      linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
  --surface:          rgba(255, 255, 255, 0.03);
  --surface-hover:    rgba(255, 255, 255, 0.06);
  --surface-dark:     rgba(2, 6, 23, 0.9);
  --card-shadow:      none;
  --card-shadow-hover:0 20px 60px rgba(0, 0, 0, 0.35);

  --text-heading:     #ffffff;
  --text-body:        rgba(148, 163, 184, 0.9);
  --text-muted:       #64748b;
  --text-subtle:      #475569;

  --border:           rgba(255, 255, 255, 0.08);
  --border-hover:     rgba(255, 255, 255, 0.16);
  --border-stat:      rgba(255, 255, 255, 0.10);

  --orb1: rgba(6,  182, 212, 0.12);
  --orb2: rgba(99, 102, 241, 0.10);
  --orb3: rgba(139, 92, 246, 0.08);
  --orb4: rgba(245,158,  11, 0.07);
  --grid: rgba(255, 255, 255, 0.015);

  --navbar-scrolled:  rgba(2, 6, 23, 0.7);

  --input-bg:         rgba(255, 255, 255, 0.04);
  --input-border:     rgba(255, 255, 255, 0.08);
  --input-focus-bg:   rgba(6, 182, 212, 0.05);

  --scroll-line:      rgba(148, 163, 184, 0.4);
  --particle-color:   rgba(255, 255, 255, 0.25);
}

/* ============================================================
   SEMANTIC UTILITY CLASSES
   ============================================================ */
.text-heading { color: var(--text-heading); }
.text-body    { color: var(--text-body);    }
.text-muted   { color: var(--text-muted);   }
.border-subtle { border-color: var(--border) !important; }

/* ============================================================
   THEME TRANSITION — only fires when switching themes
   ============================================================ */
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color 0.4s ease,
    border-color     0.4s ease,
    color            0.4s ease,
    box-shadow       0.4s ease !important;
}

/* ============================================================
   BASE
   ============================================================ */
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  min-height: 100vh;
  font-family: "Cairo", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  background: var(--bg-main);
  color: var(--text-heading);
}

/* ============================================================
   BACKGROUND ORBS
   ============================================================ */
.bg-theme {
  background: var(--bg-gradient);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}
.orb-1 {
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, var(--orb1) 0%, transparent 70%);
  top: -20%; right: -15%;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb-2 {
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, var(--orb2) 0%, transparent 70%);
  bottom: 5%; left: -10%;
  animation: orbFloat 15s ease-in-out infinite reverse;
}
.orb-3 {
  width: 25vw; height: 25vw;
  background: radial-gradient(circle, var(--orb3) 0%, transparent 70%);
  top: 40%; left: 40%;
  animation: orbFloat 10s ease-in-out infinite 3s;
}
.orb-4 {
  width: 20vw; height: 20vw;
  background: radial-gradient(circle, var(--orb4) 0%, transparent 70%);
  bottom: 30%; right: 20%;
  animation: orbFloat 9s ease-in-out infinite 6s;
}
.grid-overlay {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
}
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(2%,3%) scale(1.05); }
  66%      { transform: translate(-2%,-2%) scale(0.97); }
}

/* ============================================================
   PARTICLES
   ============================================================ */
.particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: var(--particle-color);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(0.5); opacity: 0; }
  15%  { opacity: 0.7; }
  85%  { opacity: 0.35; }
  100% { transform: translateY(-100vh) scale(1.2); opacity: 0; }
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  background: transparent;
  transition: background 0.5s, box-shadow 0.5s;
}
#navbar.scrolled {
  background: var(--navbar-scrolled);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.logo-icon {
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  flex-shrink: 0;
}

.nav-link {
  color: var(--text-body);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.nav-link:hover,
.nav-link.active {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.07);
}

.nav-link-mobile {
  color: var(--text-body);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  display: block;
}
.nav-link-mobile:hover {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.07);
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}
.theme-toggle-btn:hover {
  background: var(--surface-hover);
  border-color: #06b6d4;
  color: #06b6d4;
  transform: rotate(12deg);
}

/* Show/hide icons based on theme */
.icon-sun  { display: none; }
.icon-moon { display: block; }
html.dark .icon-sun  { display: block; }
html.dark .icon-moon { display: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  color: white !important;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(99, 102, 241, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--text-body);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.btn-ghost:hover {
  color: var(--text-heading);
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

/* ============================================================
   GLASS CARDS
   ============================================================ */
.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}
.glass-dark {
  background: var(--surface-dark);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.section-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: #0891b2;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  letter-spacing: 0.04em;
}
html.dark .section-badge {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.08);
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--text-heading);
  margin-top: 16px;
  line-height: 1.2;
}
.section-desc {
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.7;
  margin-top: 12px;
}

/* ============================================================
   GRADIENT TEXT
   ============================================================ */
.gradient-text {
  background: linear-gradient(135deg, #06b6d4 0%, #6366f1 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--card-shadow-hover);
}
.service-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
  margin-bottom: 18px;
}
.service-title {
  color: var(--text-heading);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}
.service-desc {
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.service-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.service-list li {
  color: var(--text-muted);
  font-size: 13px;
  padding-right: 14px;
  position: relative;
}
.service-list li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #06b6d4;
}

/* ============================================================
   VALUE CARDS
   ============================================================ */
.value-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.3s, border-color 0.3s;
  box-shadow: var(--card-shadow);
}
.value-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}
.value-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   MISSION CARDS
   ============================================================ */
.mission-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px;
  transition: background 0.3s, transform 0.3s;
  box-shadow: var(--card-shadow);
}
.mission-card:hover {
  background: var(--surface-hover);
  transform: translateX(-4px);
}

/* ============================================================
   CLIENTS MARQUEE
   ============================================================ */
.clients-track {
  -webkit-mask: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
  mask: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
}
.clients-inner {
  animation: marqueeRTL 28s linear infinite;
  width: max-content;
}
.clients-track:hover .clients-inner { animation-play-state: paused; }
@keyframes marqueeRTL {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.client-logo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 32px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  box-shadow: var(--card-shadow);
}
.client-logo:hover {
  background: var(--surface-hover);
  color: var(--text-heading);
  border-color: var(--border-hover);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
  box-shadow: var(--card-shadow);
}
.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
}

/* ============================================================
   TEAM
   ============================================================ */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
  box-shadow: var(--card-shadow);
}
.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
}
.team-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--border);
}

.social-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}
.social-btn:hover {
  background: rgba(6, 182, 212, 0.10);
  border-color: rgba(6, 182, 212, 0.3);
  color: #06b6d4;
}
.social-btn-lg {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}
.social-btn-lg:hover {
  background: rgba(6, 182, 212, 0.10);
  border-color: rgba(6, 182, 212, 0.25);
  color: #06b6d4;
  transform: translateY(-2px);
}

/* ============================================================
   PROCESS STEPS
   ============================================================ */
.process-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.process-step:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--card-shadow-hover);
}
.process-num {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(6,182,212,0.35), rgba(99,102,241,0.35));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  transition: all 0.3s;
  box-shadow: var(--card-shadow);
}
.contact-info-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateX(-4px);
}
.contact-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   FORM
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  color: var(--text-body);
  font-size: 13px;
  font-weight: 600;
}
.form-input {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text-heading);
  font-size: 14px;
  font-family: "Cairo", sans-serif;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: rgba(6, 182, 212, 0.5);
  background: var(--input-focus-bg);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input option { background: #0f172a; color: #fff; }
html:not(.dark) .form-input option { background: #f8fafc; color: #0f172a; }

/* ============================================================
   HERO SCROLL INDICATOR
   ============================================================ */
.scroll-indicator-line {
  background: linear-gradient(to bottom, var(--scroll-line), transparent);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.animate-fade-in     { animation: fadeIn    0.8s ease-out both; }
.animate-fade-in-up  { animation: fadeInUp  0.8s ease-out both; }
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.30s; }
.delay-3 { animation-delay: 0.50s; }

@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   COUNTER
   ============================================================ */
.counter::after { content: '+'; }
