:root {
  --bg: #070a13;
  --bg-2: #0b1020;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-strong: rgba(15, 23, 42, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(234, 179, 8, 0.48);
  --text: #f8fafc;
  --muted: #9aa6b8;
  --soft: #cbd5e1;
  --gold: #eab308;
  --gold-2: #facc15;
  --gold-dark: #a67c00;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --container: 1180px;
  --font: "Inter", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) var(--bg);
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

body.landing-v2 {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(circle at 18% 0%, rgba(234, 179, 8, 0.12), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #020617 100%);
  color: var(--text);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.landing-v2::selection { background: var(--gold-2); color: #020617; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

/* Focus Accessibility */
*:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Background Elements */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.25;
  animation: float 10s ease-in-out infinite alternate;
}

.orb-one { top: -10%; left: -10%; background: radial-gradient(circle, rgba(234, 179, 8, 0.35), transparent 60%); }
.orb-two { right: -10%; bottom: -10%; background: radial-gradient(circle, rgba(59, 130, 246, 0.28), transparent 60%); animation-delay: -5s; }

.grid-glow {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at top, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at top, black, transparent 80%);
}

.topbar, main, .footer { width: min(var(--container), calc(100% - 32px)); margin-inline: auto; }

/* Topbar */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin-top: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 10, 19, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.3);
}

.brand { display: inline-flex; align-items: center; gap: 12px; transition: opacity 0.2s; }
.brand:hover { opacity: 0.85; }

.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 50%; background: #fff;
  padding: 6px;
}

.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.01em; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 0.75rem; font-weight: 500; }

.topnav {
  justify-self: center; display: inline-flex; gap: 4px;
  padding: 4px; border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px; background: rgba(255, 255, 255, 0.02);
}

.topnav a {
  padding: 8px 16px; border-radius: 999px; color: var(--muted);
  font-size: 0.85rem; font-weight: 600; transition: all 0.3s ease;
}
.topnav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.top-actions { display: inline-flex; align-items: center; gap: 10px; }

.language-pill {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--soft); font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 6px;
}
.language-pill:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(234, 179, 8, 0.05); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.9rem; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #050816; box-shadow: 0 8px 25px rgba(234, 179, 8, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 12px 35px rgba(234, 179, 8, 0.4);
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-soft {
  border-color: var(--line); background: rgba(255, 255, 255, 0.05); color: var(--text);
}
.btn-soft:hover { border-color: var(--line-strong); background: rgba(234, 179, 8, 0.1); transform: translateY(-2px); }

.btn-ghost { padding: 8px 16px; color: var(--text); font-size: 0.85rem; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-full { width: 100%; }

/* Hero */
.hero {
  min-height: calc(100vh - 120px);
  display: grid; grid-template-columns: 1fr 0.85fr; gap: 40px;
  align-items: center; padding: 60px 0;
}

.eyebrow, .section-kicker {
  width: fit-content; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 999px; background: rgba(234, 179, 8, 0.1);
  color: var(--gold-2); font-size: 0.8rem; font-weight: 700;
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 10px var(--green), 0 0 0 4px rgba(34, 197, 94, 0.2);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1;
  letter-spacing: -0.03em; font-weight: 800; margin: 24px 0 20px;
  background: linear-gradient(to right, #fff, var(--soft));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(1rem, 1.2vw, 1.15rem); color: var(--muted);
  line-height: 1.7; max-width: 90%; margin-bottom: 32px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.trust-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }
.trust-row span {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--soft); font-size: 0.85rem; font-weight: 500;
}
.trust-row span i { color: var(--green); font-size: 0.9rem; }

/* Preview Frame */
.hero-preview {
  padding: 20px; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)), rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}

.preview-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.preview-toolbar strong { font-size: 1rem; font-weight: 700; display: block; }
.preview-toolbar span { color: var(--muted); font-size: 0.8rem; margin-top: 2px; display: block; }

.preview-tabs {
  display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px; background: rgba(0, 0, 0, 0.2);
}
.preview-tab {
  padding: 8px 16px; border: none; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: 0.3s;
}
.preview-tab.is-active { background: var(--surface-strong); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

.preview-frame {
  height: 500px; display: flex; justify-content: center; align-items: center;
  padding: 20px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.05);
  background: #f8fafc; overflow: hidden; position: relative;
}
.preview-frame img {
  height: 100%; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.preview-frame img.is-switching { opacity: 0; transform: scale(0.96) translateY(10px); }

.preview-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.dot {
  width: 8px; height: 8px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.2); cursor: pointer; transition: 0.3s;
}
.dot.is-active { width: 24px; border-radius: 10px; background: var(--gold-2); }

/* Sections Common */
.section { padding: 80px 0; animation: slideUpFade 0.8s ease backwards; }
.section-head { max-width: 600px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 800; line-height: 1.1; margin: 16px 0; }
.section-head p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

/* Stats */
.compact-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.compact-stats article {
  padding: 24px; border: 1px solid var(--line); border-radius: 24px;
  background: rgba(255, 255, 255, 0.02); text-align: center;
  transition: transform 0.3s, background 0.3s;
}
.compact-stats article:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.04); }
.compact-stats i { font-size: 1.5rem; color: var(--gold-2); margin-bottom: 12px; display: block; }
.compact-stats strong { font-size: 2.2rem; font-weight: 800; display: block; color: var(--text); }
.compact-stats span { color: var(--muted); font-size: 0.9rem; font-weight: 500; }

/* Cards Common Base */
.template-card, .process-grid article, .plan-card, .faq-grid details, .final-cta {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)), rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

/* Templates */
.template-showcase { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 16px; }
.template-card { padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 260px; }
.template-card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.2); box-shadow: var(--shadow); }
.template-card.featured {
  border-color: var(--line-strong);
  background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.15), transparent 60%), rgba(15, 23, 42, 0.7);
}
.badge {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: rgba(234, 179, 8, 0.15); color: var(--gold-2); border: 1px solid rgba(234, 179, 8, 0.3);
  margin-bottom: auto; display: inline-flex; align-items: center; gap: 6px;
}
.template-card h3 { font-size: 1.2rem; margin: 16px 0 8px; font-weight: 700; }
.template-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* Process */
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.process-grid article { padding: 30px; text-align: center; }
.process-grid article:hover { border-color: var(--gold-dark); }
.step-icon {
  width: 50px; height: 50px; margin: 0 auto 16px; border-radius: 50%;
  background: rgba(234, 179, 8, 0.1); color: var(--gold-2);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.process-grid h3 { font-size: 1.1rem; margin-bottom: 10px; font-weight: 700; }
.process-grid p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* Plans */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: stretch;
}
.plan-card {
  padding: 34px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-width: 0;
  height: 100%;
}
.plan-card .btn,
.plan-card .btn-full { margin-top: auto; }
.plan-pro {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 0 40px rgba(234, 179, 8, 0.15);
}
.plan-pro::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(234, 179, 8, 0.2), transparent 50%);
}
.plan-card h3 { font-size: 1.35rem; margin: 16px 0 8px; font-weight: 800; }
.price { font-size: 2.15rem; font-weight: 800; color: #fff; margin: 18px 0; line-height: 1.15; }
.plan-list { list-style: none; padding: 0; margin: 0 0 32px 0; display: flex; flex-direction: column; gap: 13px; }
.plan-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--soft); font-size: 0.93rem; line-height: 1.55; }
.plan-list li i { color: var(--green); font-size: 1rem; margin-top: 3px; flex: 0 0 auto; }
.plan-pro .plan-list li i { color: var(--gold-2); }

@media (max-width: 1100px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 820px;
  }

  .plan-pro { transform: none; }
}

@media (max-width: 720px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: 18px;
  }

  .plan-card { padding: 28px 22px; }
  .price { font-size: 1.9rem; }
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.faq-grid details { padding: 20px 24px; cursor: pointer; }
.faq-grid summary { font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-grid summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--gold-2); transition: 0.3s; }
.faq-grid details[open] summary::after { transform: rotate(180deg); }
.faq-grid p { margin: 16px 0 0; color: var(--muted); line-height: 1.6; font-size: 0.95rem; }

/* Final CTA */
.final-cta {
  padding: 40px 60px; display: flex; justify-content: space-between; align-items: center; gap: 30px;
  border-color: var(--gold-dark); background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(15, 23, 42, 0.8));
}
.final-cta h2 { font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 800; margin: 10px 0; }

/* Footer */
.footer { padding: 40px 0; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.footer p { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 0.95rem; margin: 0; }
.footer a { color: var(--text); font-weight: 700; transition: color 0.2s; }
.footer a:hover { color: var(--gold-2); }
.footer small { display: block; margin-top: 12px; font-size: 0.85rem; }

/* Keyframes */
@keyframes float { 0% { transform: translateY(0) scale(1); } 100% { transform: translateY(-20px) scale(1.05); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .hero-lead { margin: 0 auto 32px; }
  .hero-actions, .trust-row { justify-content: center; }
  .template-showcase { grid-template-columns: repeat(2, 1fr); }
  .preview-frame { height: 600px; }
}

@media (max-width: 768px) {
  .topbar { grid-template-columns: 1fr auto; padding: 12px; }
  .topnav { display: none; }
  .compact-stats, .process-grid, .plans-grid, .faq-grid { grid-template-columns: 1fr; }
  .final-cta { flex-direction: column; text-align: center; padding: 30px 20px; }
  .preview-frame { height: 450px; }
  .hero h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
  .top-actions .language-pill span { display: none; } /* Hide text on mobile, keep icon */
  .preview-frame { height: 350px; }
  .plan-pro { transform: scale(1); }
  .compact-stats article { padding: 16px; }
}