/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

:root {
  --primary: #E63946;
  --primary-dark: #C62E3A;
  --primary-light: #FF4D5A;
  --dark: #0D0D0F;
  --dark-2: #161619;
  --dark-3: #1E1E22;
  --dark-4: #2A2A30;
  --gray: #8E8E93;
  --gray-light: #C7C7CC;
  --white: #FFFFFF;
  --gradient: linear-gradient(135deg, #E63946 0%, #FF6B6B 50%, #FF4D5A 100%);
  --gradient-text: linear-gradient(135deg, #E63946, #FF6B6B);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--dark);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== UTILITY ===== */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  padding: 14px 28px;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(230, 57, 70, 0.5);
}

.btn-glass {
  background: var(--glass);
  color: var(--white);
  padding: 14px 28px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  color: var(--primary-light);
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(13, 13, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 0;
}

.nav-container {
  max-width: 100%;
  width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-light);
  transition: var(--transition);
  position: relative;
}

.nav-links a:not(.btn):hover {
  color: var(--white);
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  background: rgba(13, 13, 15, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-light);
  padding: 8px 0;
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--white);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 13, 15, 0.7) 0%,
    rgba(13, 13, 15, 0.5) 40%,
    rgba(13, 13, 15, 0.85) 80%,
    rgba(13, 13, 15, 1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 750px;
  padding: 0 24px;
  animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-light);
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  word-break: break-word; /* Ensure long Amharic words don't overflow */
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--gray-light);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap; /* Allow stats to wrap on small screens */
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--dark-4);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--gray);
  border-bottom: 2px solid var(--gray);
  transform: rotate(45deg);
}

/* ===== SECTIONS SHARED ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== FEATURES ===== */
.features {
  padding: 120px 0;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--dark-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-width: 0; /* Important for flex/grid children */
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 57, 70, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(230, 57, 70, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent, var(--primary));
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 120px 0;
  background: var(--dark-2);
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.step-card {
  text-align: center;
  padding: 40px 32px;
  background: var(--dark-3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  flex: 1;
  max-width: 300px;
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 57, 70, 0.3);
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--gradient);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.3);
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.6;
}

.step-connector {
  color: var(--dark-4);
  flex-shrink: 0;
}

/* ===== DOWNLOAD ===== */
.download {
  padding: 120px 0;
}

.download-card {
  background: var(--dark-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 80px;
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  overflow: hidden;
  width: 100%; /* Ensure it fills container */
}

.download-card::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.download-content {
  flex: 1;
}

.download-text {
  font-size: 1.05rem;
  color: var(--gray);
  margin-bottom: 32px;
  line-height: 1.7;
}

.download-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid var(--dark-4);
  background: var(--dark-3);
}

.store-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.store-btn small {
  display: block;
  font-size: 0.7rem;
  color: var(--gray);
  font-weight: 400;
}

.store-btn strong {
  font-size: 1rem;
  font-weight: 600;
}

.store-btn svg {
  flex-shrink: 0;
  color: var(--gray-light);
}

.download-visual {
  flex-shrink: 0;
}

.phone-mockup {
  width: 240px;
  height: 480px;
  background: var(--dark-3);
  border-radius: 36px;
  border: 3px solid var(--dark-4);
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--dark);
  border-radius: 100px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-3) 100%);
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.phone-logo {
  width: 120px;
  filter: drop-shadow(0 4px 12px rgba(230, 57, 70, 0.3));
}

.phone-text {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ===== FOOTER ===== */
.footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  height: 36px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--gray);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  color: var(--gray-light);
}

.footer-links a,
.footer-address {
  display: block;
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .download-card {
    padding: 48px;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  
  .nav-logo img {
    max-width: 140px; /* Prevent wide logo from pushing nav */
    height: 32px;
  }

  .hero-title {
    font-size: 2rem;
    padding: 0 10px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 32px 16px;
  }
  
  .stat-divider {
    display: none; /* Hide dividers on mobile to save space */
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px;
    width: 100%;
    margin: 0;
  }
  
  .container {
    padding: 0 16px;
  }

  .steps-grid {
    flex-direction: column;
    gap: 16px;
  }

  .step-connector {
    transform: rotate(90deg);
  }

  .step-card {
    max-width: 100%;
    width: 100%;
  }

  .download-card {
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
    gap: 40px;
    width: 100%;
    border-radius: var(--radius);
  }
  
  .phone-mockup {
    width: 200px; /* Scale down on mobile */
    height: 400px;
  }
  
  .phone-logo {
    width: 90px;
  }

  .download-buttons {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-header {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    gap: 12px;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Extreme mobile fixes */
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-stats {
    gap: 16px;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }

  .download-buttons {
    flex-direction: column;
  }

  .store-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== ANIMATIONS ===== */
.feature-card,
.step-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card.visible,
.step-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:nth-child(2) { transition-delay: 0.1s; }
.feature-card:nth-child(3) { transition-delay: 0.2s; }
.feature-card:nth-child(4) { transition-delay: 0.3s; }
.feature-card:nth-child(5) { transition-delay: 0.4s; }
.feature-card:nth-child(6) { transition-delay: 0.5s; }

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.lang-icon {
  font-size: 1rem;
}

.lang-label {
  letter-spacing: 0.02em;
}

.nav-right-mobile {
  display: none;
  align-items: center;
  gap: 10px;
}

@media (max-width: 768px) {
  .nav-right-mobile { display: flex; }
  .nav-links .lang-toggle { display: none; }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--gradient);
  color: var(--white);
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(230, 57, 70, 0.4);
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .toast {
    white-space: normal;
    max-width: 90vw;
    text-align: center;
    font-size: 0.85rem;
    padding: 14px 24px;
  }
}
