/* Modern RTL Farsi styles for the Resanak landing page */
:root {
  --brand-primary: #2b92c8;
  --brand-secondary: #54acdb;
  --bg: #f8fcff;
  --bg-gradient-start: #f0f9ff;
  --bg-gradient-end: #e0f2fe;
  --accent: #2b92c8;
  --accent-hover: #2378a8;
  --accent-light: #54acdb;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-brand: 0 10px 30px -5px rgba(43, 146, 200, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Vazir', 'Tahoma', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  direction: rtl;
  position: relative;
  overflow-x: hidden;
}

/* Animated background elements */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(84, 172, 219, 0.08) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -30%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(43, 146, 200, 0.06) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
  z-index: 0;
  pointer-events: none;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.card {
  width: 100%;
  max-width: 1000px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(43, 146, 200, 0.05);
  display: flex;
  gap: 3rem;
  padding: 3rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(43, 146, 200, 0.1);
}

.hero {
  flex: 1 1 480px;
  animation: fadeInUp 0.6s ease-out;
}

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

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

.logo-wrap svg {
  filter: drop-shadow(0 4px 8px rgba(43, 146, 200, 0.2));
  transition: transform 0.3s ease;
}

.logo-wrap:hover svg {
  transform: scale(1.05) rotate(2deg);
}

.brand {
  font-size: 2.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tag {
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.desc {
  margin-top: 1.75rem;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
  max-width: 90%;
}

.actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  box-shadow: var(--shadow-brand);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(43, 146, 200, 0.4);
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--brand-primary) 100%);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.btn.secondary {
  background: transparent;
  color: var(--brand-primary);
  box-shadow: inset 0 0 0 2px var(--brand-secondary);
  border: 2px solid var(--brand-secondary);
}

.btn.secondary:hover {
  background: rgba(84, 172, 219, 0.1);
  color: var(--brand-primary);
  box-shadow: inset 0 0 0 2px var(--brand-primary), 0 4px 12px rgba(84, 172, 219, 0.2);
  transform: translateY(-2px);
}

.mock {
  width: 320px;
  flex: 0 0 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: fadeInRight 0.8s ease-out 0.2s both;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mock::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 500px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  border-radius: 24px;
  opacity: 0.1;
  filter: blur(40px);
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.15;
  }
}

#screenshot {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#shot-img {
  width: 220px;
  height: auto;
  border-radius: 16px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

#shot-img:hover {
  transform: scale(1.02) translateY(-5px);
}

.footer {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(84, 172, 219, 0.05) 0%, rgba(43, 146, 200, 0.05) 100%);
  border-radius: 12px;
  border: 1px solid rgba(84, 172, 219, 0.1);
}

.footer strong {
  color: var(--brand-primary);
  font-weight: 700;
}

@media (max-width: 800px) {
  .card {
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }

  .mock {
    order: -1;
    flex: 0 0 auto;
    width: 200px;
  }

  .mock::before {
    width: 180px;
    height: 350px;
  }

  #screenshot {
    width: 180px;
    height: auto;
  }

  #shot-img {
    width: 180px;
  }

  .brand {
    font-size: 2rem;
  }

  .desc {
    max-width: 100%;
    font-size: 1rem;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  body::before,
  body::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .brand {
    font-size: 1.75rem;
  }

  .logo-wrap {
    gap: 1rem;
  }

  .logo-wrap svg {
    width: 50px;
    height: 60px;
  }
}

/* Small helper for Persian number styling */
.persian {
  font-variant-numeric: tabular-nums;
}
