/* ============================================
   DOMINO SCORE — CSS Design System
   ============================================ */

:root {
  --primary: #153E7C;
  --primary-light: #1D52A8;
  --primary-glow: rgba(21, 62, 124, 0.4);
  --accent: #F59E0B;
  --accent-light: #FCD34D;
  --pink: #EC4899;
  --bg-dark: #080F1E;
  --bg-card: #0D1A35;
  --bg-card2: #111E3C;
  --text-primary: #F0F4FF;
  --text-secondary: #94A3B8;
  --text-ar: #CBD5E1;
  --border: rgba(255, 255, 255, 0.07);
  --white: #FFFFFF;
  --gradient-main: linear-gradient(135deg, #153E7C 0%, #1D52A8 50%, #1A3D7C 100%);
  --gradient-gold: linear-gradient(135deg, #F59E0B, #EF4444);
  --gradient-hero: linear-gradient(160deg, #080F1E 0%, #0D1A35 60%, #0A1628 100%);
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(21, 62, 124, 0.5);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Arabic RTL global overrides */
[dir='rtl'] .nav-links {
  flex-direction: row-reverse;
}

[dir='rtl'] .hero-container {
  direction: rtl;
}

[dir='rtl'] .hero-content {
  align-items: flex-end;
  text-align: right;
}

[dir='rtl'] .hero-actions {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir='rtl'] .section-header {
  direction: rtl;
}

[dir='rtl'] .steps-grid {
  direction: rtl;
}

[dir='rtl'] .footer-container {
  direction: rtl;
}

[dir='rtl'] .footer-brand p {
  text-align: right;
}

[dir='rtl'] .footer-bottom {
  direction: rtl;
}

[dir='rtl'] .download-content {
  direction: rtl;
}

[dir='rtl'] .hero-stats {
  direction: rtl;
}

[dir='rtl'] .legal-body {
  direction: rtl;
}

[dir='rtl'] .legal-section ul li {
  padding-left: 0;
  padding-right: 20px;
}

[dir='rtl'] .legal-section ul li::before {
  left: auto;
  right: 0;
}

[dir='rtl'] .legal-toc ol {
  padding-left: 0;
  padding-right: 20px;
}

[dir='rtl'] .legal-hero-content {
  direction: rtl;
}

/* === SECTION SHARED === */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  background: rgba(21, 62, 124, 0.3);
  border: 1px solid rgba(21, 62, 124, 0.6);
  color: var(--accent-light);
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, var(--pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(8, 15, 30, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.navbar.scrolled {
  background: rgba(8, 15, 30, 0.95);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(21, 62, 124, 0.4));
}

.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--white);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.22);
}

.lang-toggle .lang-icon {
  font-size: 0.9rem;
}

.lang-toggle--mobile {
  margin-top: 8px;
  align-self: flex-start;
  border: 1px solid var(--border);
}

.nav-cta {
  background: var(--gradient-main);
  color: var(--white);
  padding: 9px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 16px var(--primary-glow);
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  gap: 4px;
}

.mobile-menu a {
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--white);
}

.mobile-menu.open {
  display: flex;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  background: var(--gradient-hero);
  position: relative;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: floatShape 8s ease-in-out infinite;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #153E7C, transparent);
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #F59E0B, transparent);
  bottom: 100px;
  left: 5%;
  animation-delay: -3s;
  opacity: 0.2;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, #EC4899, transparent);
  top: 30%;
  right: 20%;
  animation-delay: -5s;
  opacity: 0.15;
}

.domino-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

@keyframes floatShape {

  0%,
  100% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-light);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 8px #22C55E;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.4);
  }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  max-width: 480px;
}

.hero-subtitle-ar {
  font-size: 1rem;
  color: var(--text-ar);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--bg-dark);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.btn-primary svg {
  width: 20px;
  height: 20px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all var(--transition);
}

.btn-secondary svg {
  width: 20px;
  height: 20px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-light);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* PHONE MOCKUPS */
.hero-phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 580px;
}

.phone-mockup {
  position: absolute;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-front {
  width: 210px;
  height: 440px;
  left: 50%;
  top: 50%;
  transform: translate(-60%, -50%);
  z-index: 2;
  animation: floatPhone 5s ease-in-out infinite;
}

.phone-back {
  width: 200px;
  height: 420px;
  left: 50%;
  top: 50%;
  transform: translate(-10%, -45%);
  z-index: 1;
  filter: brightness(0.7);
  animation: floatPhone 5s ease-in-out infinite;
  animation-delay: -2.5s;
}

@keyframes floatPhone {

  0%,
  100% {
    transform: translate(-60%, -50%) translateY(0px);
  }

  50% {
    transform: translate(-60%, -50%) translateY(-16px);
  }
}

.phone-back {
  animation-name: floatPhoneBack;
}

@keyframes floatPhoneBack {

  0%,
  100% {
    transform: translate(-10%, -45%) translateY(0px);
  }

  50% {
    transform: translate(-10%, -45%) translateY(-10px);
  }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transform: rotate(45deg);
  animation: bounceDown 1.5s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes bounceDown {

  0%,
  100% {
    transform: rotate(45deg) translateY(0);
    opacity: 0.5;
  }

  50% {
    transform: rotate(45deg) translateY(6px);
    opacity: 1;
  }
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  padding: 120px 0;
  background: var(--bg-dark);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(21, 62, 124, 0.6), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(21, 62, 124, 0.5);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(21, 62, 124, 0.2);
}

.feature-card--accent {
  background: var(--bg-card2);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--white);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.feature-card strong {
  color: var(--accent-light);
  font-weight: 600;
}

.feature-ar {
  font-size: 0.82rem !important;
  color: rgba(148, 163, 184, 0.6) !important;
  margin-top: 4px !important;
}

/* ============================================
   SCREENSHOTS CAROUSEL
   ============================================ */
.screenshots {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 50%, var(--bg-dark) 100%);
  overflow: hidden;
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.carousel-track-container {
  flex: 1;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 32px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.device-frame {
  width: 190px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(255, 255, 255, 0.04), 0 0 0 7px rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--transition);
}

.carousel-slide:hover .device-frame {
  transform: scale(1.03);
}

.device-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.slide-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.carousel-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: 120px 0;
  background: var(--bg-dark);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: center;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.step-card:hover {
  transform: translateY(-8px);
  border-color: rgba(21, 62, 124, 0.5);
  box-shadow: var(--shadow-card);
}

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-main);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--white);
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.step-connector {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  position: relative;
}

.step-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--primary-light);
  border-right: 2px solid var(--primary-light);
  transform: rotate(45deg);
}

/* ============================================
   DOWNLOAD
   ============================================ */
.download {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

.download-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dl-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
}

.dl-shape-1 {
  width: 600px;
  height: 600px;
  background: var(--primary);
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

.dl-shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -100px;
  right: 10%;
  opacity: 0.1;
}

.download-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.download-logo {
  height: 100px;
  width: auto;
  margin: 0 auto 32px;
  filter: drop-shadow(0 8px 24px rgba(21, 62, 124, 0.5));
  animation: floatPhone 5s ease-in-out infinite;
}

.download-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 16px;
}

.download-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.download-subtitle strong {
  color: var(--accent-light);
}

.download-subtitle-ar {
  font-size: 0.95rem;
  color: var(--text-ar);
  margin-bottom: 40px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  color: var(--bg-dark);
  padding: 14px 28px;
  border-radius: 14px;
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
  min-width: 185px;
}

.store-btn svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(255, 255, 255, 0.2);
}

.store-btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-btn-sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: #64748B;
}

.store-btn-main {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg-dark);
}

.download-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 64px 0 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
}

.footer-brand img {
  height: 52px;
  width: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 2px 8px rgba(21, 62, 124, 0.3));
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.footer-brand .ar-text {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-bottom .ar-text {
  font-family: 'Tajawal', sans-serif;
}

/* ============================================
   LEGAL PAGES (Privacy & Terms)
   ============================================ */
.legal-page {
  padding-top: 100px;
  min-height: 100vh;
  background: var(--bg-dark);
}

.legal-hero {
  background: var(--gradient-hero);
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

.legal-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.legal-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.legal-hero p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.legal-hero-ar {
  font-family: 'Tajawal', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.legal-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 64px 24px;
}

.legal-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 28px;
  margin-bottom: 48px;
}

.legal-toc h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.legal-toc ol {
  list-style: decimal;
  padding-left: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.legal-toc li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.legal-toc li a:hover {
  color: var(--accent-light);
}

.legal-section {
  margin-bottom: 48px;
  scroll-margin-top: 100px;
}

.legal-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-section h2 .section-num {
  width: 32px;
  height: 32px;
  background: rgba(21, 62, 124, 0.4);
  border: 1px solid rgba(21, 62, 124, 0.6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent-light);
  flex-shrink: 0;
}

.legal-section h2 .section-ar {
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
}

.legal-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-section ul {
  list-style: none;
  margin: 12px 0 16px;
}

.legal-section ul li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 6px 0 6px 20px;
  position: relative;
  line-height: 1.7;
}

.legal-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.legal-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-section a {
  color: var(--accent-light);
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

.legal-last-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(21, 62, 124, 0.2);
  border: 1px solid rgba(21, 62, 124, 0.4);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.legal-contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 32px;
  text-align: center;
  margin-top: 48px;
}

.legal-contact-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.legal-contact-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.legal-contact-card a {
  color: var(--accent-light);
  font-weight: 600;
}

/* ============================================
   RESPONSIVENESS
   ============================================ */
@media (max-width: 968px) {

  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }

  .hero-content {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle,
  .hero-subtitle-ar {
    text-align: center;
  }

  .hero-phones {
    order: 2;
    height: 380px;
  }

  .phone-front {
    width: 170px;
    height: 360px;
    transform: translate(-60%, -50%);
  }

  .phone-back {
    width: 160px;
    height: 340px;
    transform: translate(-10%, -45%);
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .step-connector {
    display: none;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-links {
    gap: 32px;
  }

  .legal-toc ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 80px 0 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .store-btn {
    width: 100%;
    max-width: 280px;
  }

  .footer-links {
    flex-direction: column;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .carousel-btn {
    display: none;
  }

  .hero-stats {
    gap: 16px;
  }

  .stat-number {
    font-size: 1.4rem;
  }
}

/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.feature-card,
.step-card,
.carousel-slide {
  opacity: 0;
}

.feature-card.visible,
.step-card.visible,
.carousel-slide.visible {
  animation: fadeInUp 0.5s ease forwards;
}