/* =======================================================
           SAAS THEME VARIABLES & OVERRIDES
           (Note: You can move this to index.css later for cleaner code)
           ======================================================= */
:root {
  --white: #ffffff;
  --gradient: radial-gradient(
    circle,
    rgba(59, 170, 206, 1) 47%,
    rgba(40, 130, 209, 1) 100%
  );
  --gray-50: #f7f8fb;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #525252;
  --gray-700: #454545;
  --gray-800: #333333;
  --gray-900: #282828;
  --gray-950: #181818;

  --brand-500: #37a0a0;
  --brand-600: #2a7a8a;
  --brand-700: #2e808f;
  --brand-soft-light: rgba(55, 160, 160, 0.1);
  --brand-soft-dark: rgba(55, 160, 160, 0.15);

  --font-main: "Tajawal", sans-serif;
  --container-width: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-24: 24px;
}

/* Dark Theme Defaults */
body {
  --bg-body: var(--gray-900);
  --bg-panel: var(--gray-800);
  --bg-surface: var(--gray-700);
  --bg-footer: var(--gray-900);
  --accent: var(--brand-500);
  --accent-hover: var(--brand-700);
  --accent-soft: var(--brand-soft-dark);
  --border: var(--gray-800);
  --text-main: var(--gray-200);
  --text-muted: var(--gray-400);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-2: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(55, 160, 160, 0.1);
}

[data-theme="light"] body {
  --bg-body: var(--gray-50);
  --bg-surface: var(--white);
  --bg-panel: var(--white);
  --accent-hover: var(--brand-600);
  --accent-soft: var(--brand-soft-light);
  --border: var(--gray-200);
  --text-main: var(--gray-950);
  --text-muted: var(--gray-500);
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-2:
    0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-3:
    0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-glow: 0 0 40px rgba(55, 160, 160, 0.15);
}

/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition:
    background-color var(--transition),
    color var(--transition);
}
a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  font-family: inherit;
  outline: none;
  border: none;
  background: transparent;
}
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Scroll Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}
.delay-100 {
  transition-delay: 100ms;
}
.delay-200 {
  transition-delay: 200ms;
}
.delay-300 {
  transition-delay: 300ms;
}
.delay-400 {
  transition-delay: 400ms;
}

/* UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-12);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}
.btn-primary {
  background-color: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(55, 160, 160, 0.2);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(55, 160, 160, 0.3);
}
.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background-color: var(--bg-panel);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  color: var(--text-muted);
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-ghost:hover {
  background-color: var(--bg-surface);
  color: var(--accent);
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  background-color: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(55, 160, 160, 0.2);
}
.w-100 {
  width: 100%;
  justify-content: center;
}

/* Header / Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(var(--bg-surface), 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(156, 163, 175, 0.1);
  transition: all var(--transition);
}
[data-theme="light"] header {
  background-color: rgba(255, 255, 255, 0.85);
}
[data-theme="dark"] header {
  background-color: rgba(40, 40, 40, 0.85);
}
.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}
.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.desktop-actions {
  display: flex;
}
.mobile-actions {
  display: none;
}

/* Hero */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(55, 160, 160, 0.15) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  z-index: -1;
  pointer-events: none;
}
[data-theme="dark"] .hero-glow {
  background: radial-gradient(
    circle,
    rgba(55, 160, 160, 0.1) 0%,
    rgba(40, 40, 40, 0) 70%
  );
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--text-main);
  letter-spacing: -1px;
}
.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

/* Mockup Window */
.mockup-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-16);
  padding: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid var(--border);
  box-shadow: var(--shadow-3), var(--shadow-glow);
  position: relative;
}
.mockup-window {
  background-color: var(--bg-surface);
  border-radius: var(--radius-12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mockup-header {
  background-color: var(--bg-panel);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}
.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-r {
  background-color: #ff5f56;
}
.dot-y {
  background-color: #ffbd2e;
}
.dot-g {
  background-color: #27c93f;
}
.mockup-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 400px;
}
.mockup-sidebar {
  background-color: var(--bg-body);
  border-left: 1px solid var(--border);
  padding: 20px;
}
.mockup-sidebar-item {
  height: 20px;
  background: var(--bg-surface);
  border-radius: 6px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.mockup-sidebar-item.short {
  width: 60%;
}
.mockup-editor {
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-surface);
  position: relative;
}
.mockup-document {
  width: 100%;
  max-width: 450px;
  height: 100%;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
[data-theme="dark"] .mockup-document {
  background: var(--gray-800);
}
.doc-line {
  height: 12px;
  background: var(--border);
  border-radius: 4px;
  opacity: 0.5;
}
.doc-line.title {
  height: 24px;
  width: 50%;
  margin: 0 auto 20px;
  background: var(--accent-soft);
  opacity: 1;
}
.doc-line.field {
  display: inline-block;
  width: 80px;
  background: rgba(55, 160, 160, 0.2);
  border-bottom: 2px dashed var(--accent);
}

/* Sections */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-main);
}
.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* How it Works */
.how-it-works {
  padding: 100px 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}
@media (min-width: 992px) {
  .steps-grid::after {
    content: "";
    position: absolute;
    top: 72px;
    left: 15%;
    right: 15%;
    height: 2px;
    border-top: 2px dashed var(--border);
    z-index: 0;
  }
}
.step-card {
  background-color: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-24);
  padding: 40px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}
.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
  border-color: rgba(55, 160, 160, 0.4);
}
.step-number {
  width: 64px;
  height: 64px;
  background: var(--bg-panel);
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  margin: 0 auto 24px auto;
  transition: all var(--transition);
}
.step-card:hover .step-number {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-glow);
}
.step-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}
.step-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Features */
.features {
  padding: 100px 0;
  background-color: var(--bg-body);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-24);
  padding: 40px 30px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
  border-color: rgba(55, 160, 160, 0.3);
}
.feature-icon-wrapper {
  width: 64px;
  height: 64px;
  background-color: var(--accent-soft);
  color: var(--accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 24px;
}
.feature-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}
.feature-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* Pricing */
.pricing {
  padding: 100px 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: center;
}
.pricing-card {
  background-color: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-24);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}
.pricing-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}
.pricing-card.featured {
  background-color: var(--bg-panel);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-3), var(--shadow-glow);
  transform: scale(1.05);
  padding: 40px 20px;
  position: relative;
  z-index: 2;
}
.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.plan-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.price {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.plan-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  flex-grow: 1;
}
.features-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
}
.features-list i {
  color: var(--accent);
  font-size: 1.2rem;
}

/* Footer */
footer {
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1100px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .pricing-card.featured {
    transform: scale(1);
  }
}
@media (max-width: 992px) {
  .desktop-actions {
    display: none !important;
  }
  .mobile-actions {
    display: flex !important;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .feature-grid,
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pricing-card.featured {
    padding: 30px 20px;
  }
  .mockup-body {
    grid-template-columns: 1fr;
  }
  .mockup-sidebar {
    display: none;
  }
}

@media (min-width: 993px) {
  #mobile-menu {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
