/* ===== Variables — matching app identity ===== */
:root {
  --bg: #0D0B1E;
  --bg-gradient-top: #1a0533;
  --card: #1A1535;
  --card-glass: rgba(26, 21, 53, 0.75);
  --foreground: #F5F2FF;
  --muted: #9B8FBF;
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --secondary: #1E1840;
  --accent: #F59E0B;
  --border: #2E2260;
  --success: #10B981;
  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--foreground);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

/* ===== Background ===== */
#hex-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.vignette {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35vh;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.25));
  z-index: 1;
  pointer-events: none;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(13, 11, 30, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
}

.nav-icon {
  border-radius: 10px;
}

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

.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--foreground);
  background: rgba(124, 58, 237, 0.12);
}

.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
}

.nav-cta:hover {
  background: #6D28D9 !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--foreground);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Main ===== */
main {
  position: relative;
  z-index: 2;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 28px 32px;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.2), transparent);
  pointer-events: none;
}

.hero-logo-wrap {
  position: relative;
  animation: pulse 2.8s ease-in-out infinite;
}

.hero-logo {
  width: 180px;
  height: 180px;
  margin: 0 auto 8px;
  object-fit: contain;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 4px;
}

.tagline-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 18px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
}

.pill-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(13, 11, 30, 0.5);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.hero-feature svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 520px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
  flex: 1;
  min-width: 180px;
}

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

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: rgba(26, 21, 53, 0.5);
  color: var(--foreground);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(26, 21, 53, 0.8);
}

/* ===== Sections ===== */
.section {
  padding: 80px 0;
  position: relative;
}

.section-alt {
  background: rgba(26, 21, 53, 0.35);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.about-card {
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.3s;
}

.about-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-4px);
}

.about-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 16px;
}

.about-icon svg {
  width: 24px;
  height: 24px;
}

.about-icon.purple {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-light);
}

.about-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
}

.about-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.about-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== Steps ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}

.step:hover {
  border-color: rgba(124, 58, 237, 0.35);
}

.step-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: 14px;
  font-size: 1.3rem;
  font-weight: 800;
}

.step-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-body p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-3px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-icon.purple {
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-light);
}

.feature-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
}

.feature-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ===== Categories ===== */
.categories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.category-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.category-chip:hover {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  transform: scale(1.03);
}

.category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--primary-light);
  flex-shrink: 0;
}

.category-icon svg {
  width: 18px;
  height: 18px;
}

/* ===== Download ===== */
.download-section {
  padding-bottom: 100px;
}

.download-card {
  position: relative;
  text-align: center;
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.download-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.25), transparent);
  pointer-events: none;
}

.download-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  object-fit: contain;
  position: relative;
}

.download-card h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
}

.download-card > p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  position: relative;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  position: relative;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(13, 11, 30, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.3s, background 0.3s, transform 0.15s;
  min-width: 200px;
}

.store-btn:hover {
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.store-btn svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.store-btn small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.store-btn strong {
  font-size: 1.05rem;
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  background: rgba(13, 11, 30, 0.9);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  object-fit: contain;
  opacity: 0.85;
}

.footer-tagline {
  color: var(--muted);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.footer-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--foreground);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ===== Legal Page ===== */
.legal-page {
  padding: calc(var(--header-h) + 48px) 0 80px;
}

.legal-header {
  text-align: center;
  margin-bottom: 40px;
}

.legal-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.legal-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.legal-nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.legal-nav a:hover,
.legal-nav a.active {
  color: var(--foreground);
  border-color: var(--primary);
  background: rgba(124, 58, 237, 0.1);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 760px;
  margin: 0 auto;
}

.legal-section {
  background: var(--card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.legal-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.legal-section-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--primary-light);
  flex-shrink: 0;
}

.legal-section-icon svg {
  width: 20px;
  height: 20px;
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 8px;
}

.legal-section h3:first-of-type {
  margin-top: 0;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-section ul {
  margin: 8px 0 0;
  padding-right: 20px;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-updated {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.8;
}

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 11, 30, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .hero-card {
    padding: 32px 20px 28px;
  }

  .hero-logo {
    width: 140px;
    height: 140px;
  }

  .btn {
    min-width: 100%;
  }

  .section {
    padding: 60px 0;
  }

  .step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo-wrap { animation: none; }
}
