/* ============================================
   SEERAH JOURNEY - Website Styles
   Spiritual Minimal Design
   ============================================ */

/* --- CSS Variables (Design System) --- */
:root {
  /* Colors - matching the mobile app */
  --primary: #27AE60;
  --primary-light: #447F74;
  --primary-dark: #1A3C34;
  --accent: #F1C40F;
  --accent-dark: #C29624;
  --bg: #F5F2EA;
  --bg-secondary: #EBE8E0;
  --text: #2D3436;
  --text-secondary: #4A5568;
  --text-subtle: #636E72;
  --white: #FFFFFF;
  --border: #E2E8F0;

  /* Typography */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Outfit', sans-serif;
  --font-arabic: 'Amiri', serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(241, 196, 15, 0.4);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z' fill='none' stroke='%2327AE60' stroke-width='0.5' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 65ch;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Arabic Text */
.arabic {
  font-family: var(--font-arabic);
  font-size: 1.5rem;
  direction: rtl;
  color: var(--accent-dark);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-sm) 0;
  background: rgba(245, 242, 234, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--transition-base);
}

.header.scrolled {
  padding: var(--space-xs) 0;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-subtle);
  transition: color var(--transition-fast);
}

.nav a:hover {
  color: var(--primary);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  padding-top: calc(var(--space-2xl) + 60px);
}

.hero-logo {
  width: 160px;
  height: 160px;
  margin-bottom: var(--space-lg);
  animation: float 3s ease-in-out infinite, glow-pulse 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(241, 196, 15, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 50px rgba(241, 196, 15, 0.6));
  }
}

.hero-title {
  margin-bottom: var(--space-sm);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.hero-title .highlight {
  color: var(--primary);
}

.hero-title .pbuh {
  font-family: var(--font-arabic);
  font-size: 0.8em;
  color: var(--accent-dark);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-subtle);
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.app-store-btn {
  display: inline-block;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
}

.app-store-btn img {
  height: 54px;
  transition: transform var(--transition-base);
}

.app-store-btn:hover img {
  transform: scale(1.05);
}

/* --- Features Section --- */
.features {
  background: var(--bg-secondary);
}

.features-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.features-header h2 {
  margin-bottom: var(--space-sm);
}

.features-header p {
  margin: 0 auto;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(30px);
}

.feature-card.visible {
  animation: revealCard 0.6s ease forwards;
}

.feature-card:nth-child(1).visible { animation-delay: 0.1s; }
.feature-card:nth-child(2).visible { animation-delay: 0.2s; }
.feature-card:nth-child(3).visible { animation-delay: 0.3s; }
.feature-card:nth-child(4).visible { animation-delay: 0.4s; }

@keyframes revealCard {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--white);
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.feature-card p {
  font-size: 1rem;
  color: var(--text-subtle);
  margin: 0;
}

/* --- Stats Section --- */
.stats {
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.stat-item {
  padding: var(--space-md);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 1rem;
  color: var(--text-subtle);
}

/* --- CTA Section --- */
.cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30 Z' fill='none' stroke='%23ffffff' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
  pointer-events: none;
}

.cta h2 {
  color: var(--white);
  margin-bottom: var(--space-sm);
  position: relative;
}

.cta p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto var(--space-lg);
  position: relative;
}

.cta .app-store-btn {
  position: relative;
  opacity: 1;
  animation: none;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.footer-logo svg {
  width: 32px;
  height: 32px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--text-subtle);
}

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

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-subtle);
}

/* --- Legal Pages --- */
.legal-page {
  padding-top: 100px;
  padding-bottom: var(--space-2xl);
  min-height: 100vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: var(--space-sm);
  text-align: center;
}

.legal-content .last-updated {
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.9375rem;
  margin-bottom: var(--space-xl);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--primary);
}

.legal-content h3 {
  font-size: 1.25rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  margin-bottom: var(--space-md);
}

.legal-content ul, .legal-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.legal-content li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-content strong {
  color: var(--text);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --space-2xl: 3rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .nav {
    gap: var(--space-md);
  }

  .hero {
    min-height: auto;
    padding-top: 140px;
    padding-bottom: var(--space-xl);
  }

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

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 100px;
    height: 100px;
  }

  .app-store-btn img {
    height: 46px;
  }

  .feature-card {
    padding: var(--space-md);
  }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
