/* ===================================
   ArSyra — CSS
   Arabic RTL, Desert Gold Aesthetic
   =================================== */

/* --- Variables --- */
:root {
  --c-bg: #faf8f4;
  --c-bg-accent: #f3efe7;
  --c-bg-dark: #1a1714;
  --c-text: #2c2520;
  --c-text-soft: #6b5f54;
  --c-text-light: #f5f0e8;
  --c-gold: #c8963e;
  --c-gold-light: #e8c88a;
  --c-gold-dark: #9e7430;
  --c-accent: #d4a853;
  --c-success: #3a8a5c;
  --c-error: #c45040;
  --c-border: #e0d8cc;
  --c-card: #ffffff;
  --c-card-shadow: rgba(44, 37, 32, 0.06);

  --font-display: 'Noto Kufi Arabic', serif;
  --font-body: 'IBM Plex Sans Arabic', sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --max-w: 1140px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* --- Background Pattern --- */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.03;
  background-image:
    radial-gradient(circle at 20% 50%, var(--c-gold) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, var(--c-gold) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, var(--c-gold) 1px, transparent 1px);
  background-size: 60px 60px, 80px 80px, 100px 100px;
}

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(224, 216, 204, 0.5);
  transition: var(--transition);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.nav__logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-dark));
  color: white;
  border-radius: var(--r-sm);
  font-size: 1.1rem;
  font-weight: 800;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav__links a:hover { color: var(--c-gold); }

.nav__cta {
  background: var(--c-gold);
  color: white !important;
  padding: 8px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  transition: var(--transition);
}

.nav__cta:hover { background: var(--c-gold-dark); }

.nav__menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav__menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  gap: var(--space-sm);
  font-size: 0.95rem;
  font-weight: 500;
  border-top: 1px solid var(--c-border);
}

.nav__mobile.active { display: flex; }

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__menu { display: flex; }
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(64px + var(--space-xl)) var(--space-md) var(--space-xl);
  max-width: var(--max-w);
  margin: 0 auto;
  gap: var(--space-xl);
}

.hero__content { flex: 1; }

.hero__badge {
  display: inline-block;
  background: var(--c-bg-accent);
  border: 1px solid var(--c-border);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-soft);
  margin-bottom: var(--space-md);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--space-md);
  color: var(--c-text);
}

.hero__highlight {
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--c-text-soft);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

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

.hero__stat { text-align: center; }

.hero__stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--c-gold-dark);
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--c-text-soft);
  font-weight: 500;
}

.hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--c-border);
}

/* Phone Mockup */
.hero__visual {
  flex: 0 0 320px;
}

.phone-mockup {
  background: var(--c-bg-dark);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 30px 60px rgba(44, 37, 32, 0.15),
    0 10px 20px rgba(44, 37, 32, 0.1);
  position: relative;
}

.phone-mockup__notch {
  width: 100px;
  height: 24px;
  background: var(--c-bg-dark);
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  top: -1px;
}

.phone-mockup__screen {
  background: #ece5dd;
  border-radius: 26px;
  min-height: 400px;
  padding: var(--space-sm);
  overflow: hidden;
}

.chat { display: flex; flex-direction: column; gap: 10px; }

.chat__msg { display: flex; }

.chat__msg--bot { justify-content: flex-start; }
.chat__msg--user { justify-content: flex-end; }

.chat__bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
  direction: rtl;
}

.chat__msg--bot .chat__bubble {
  background: white;
  color: var(--c-text);
  border-bottom-right-radius: 4px;
}

.chat__msg--user .chat__bubble {
  background: #dcf8c6;
  color: var(--c-text);
  border-bottom-left-radius: 4px;
}

@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; min-height: auto; padding-top: calc(64px + var(--space-lg)); }
  .hero__subtitle { margin: 0 auto var(--space-lg); }
  .hero__actions { justify-content: center; }
  .hero__stats { justify-content: center; }
  .hero__visual { flex: none; width: 280px; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--r-md);
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn--primary {
  background: linear-gradient(135deg, var(--c-gold), var(--c-gold-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(200, 150, 62, 0.3);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 150, 62, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border: 1.5px solid var(--c-border);
}

.btn--ghost:hover { border-color: var(--c-gold); color: var(--c-gold); }

.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--full { width: 100%; }

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

.section--accent { background: var(--c-bg-accent); }

.section--dark {
  background: var(--c-bg-dark);
  color: var(--c-text-light);
}

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

.section__tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--c-gold);
  background: rgba(200, 150, 62, 0.1);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: var(--space-sm);
}

.section__tag--light {
  color: var(--c-gold-light);
  background: rgba(232, 200, 138, 0.1);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.section__title--light { color: var(--c-text-light); }

.section__desc {
  font-size: 1.05rem;
  color: var(--c-text-soft);
  max-width: 500px;
  margin: 0 auto;
}

.section__desc--light { color: rgba(245, 240, 232, 0.6); }

/* --- Steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.step {
  text-align: center;
  padding: var(--space-lg);
  background: var(--c-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  position: relative;
  transition: var(--transition);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--c-card-shadow);
}

.step::before {
  content: attr(data-step);
  position: absolute;
  top: -14px;
  right: 24px;
  width: 28px;
  height: 28px;
  background: var(--c-gold);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.step__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.step__desc {
  font-size: 0.9rem;
  color: var(--c-text-soft);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

/* --- Earn Cards --- */
.earn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  align-items: start;
}

.earn-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--space-lg);
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.earn-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--c-card-shadow);
}

.earn-card--featured {
  border-color: var(--c-gold);
  border-width: 2px;
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(200, 150, 62, 0.15);
}

.earn-card--featured:hover {
  transform: scale(1.05) translateY(-4px);
}

.earn-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-gold);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

.earn-card__period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.earn-card__amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--c-gold-dark);
  margin: var(--space-sm) 0;
}

.earn-card__amount span {
  font-size: 1rem;
  font-weight: 500;
}

.earn-card__details {
  list-style: none;
  text-align: right;
  font-size: 0.88rem;
  color: var(--c-text-soft);
}

.earn-card__details li {
  padding: 8px 0;
  border-top: 1px solid var(--c-border);
}

.earn-card__details li::before {
  content: '✓ ';
  color: var(--c-success);
  font-weight: 700;
}

@media (max-width: 768px) {
  .earn-grid { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
  .earn-card--featured { transform: none; }
  .earn-card--featured:hover { transform: translateY(-4px); }
}

/* --- Countries --- */
.countries-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.country-tag {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.country-tag:hover {
  border-color: var(--c-gold);
  background: rgba(200, 150, 62, 0.05);
}

/* --- Quiz --- */
.quiz {
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-xl);
  padding: var(--space-lg);
}

.quiz__progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.quiz__progress-bar {
  height: 100%;
  width: 33%;
  background: var(--c-gold);
  border-radius: 100px;
  transition: width 0.5s ease;
}

.quiz__question {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-md);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz__input-wrap {
  display: flex;
  gap: 10px;
}

.quiz__input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.quiz__input::placeholder { color: rgba(255, 255, 255, 0.3); }
.quiz__input:focus { border-color: var(--c-gold); }

.quiz__submit {
  width: 50px;
  height: 50px;
  background: var(--c-gold);
  color: white;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.quiz__submit:hover { background: var(--c-gold-dark); }

.quiz__counter {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(245, 240, 232, 0.4);
  margin-top: var(--space-sm);
}

.quiz__result {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-xl);
}

.quiz__result-icon { font-size: 3rem; margin-bottom: var(--space-sm); }
.quiz__result h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: var(--space-xs); }
.quiz__result p { color: rgba(245, 240, 232, 0.6); margin-bottom: var(--space-md); }

/* --- FAQ --- */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item[open] { border-color: var(--c-gold); }

.faq-item__q {
  padding: 18px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item__q::-webkit-details-marker { display: none; }

.faq-item__q::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--c-gold);
  transition: var(--transition);
  flex-shrink: 0;
  margin-right: var(--space-sm);
}

.faq-item[open] .faq-item__q::after {
  transform: rotate(45deg);
}

.faq-item__a {
  padding: 0 24px 18px;
  font-size: 0.9rem;
  color: var(--c-text-soft);
  line-height: 1.8;
}

/* --- Registration Form --- */
.reg-form {
  max-width: 480px;
  margin: 0 auto;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--space-lg);
}

.reg-form__group { margin-bottom: var(--space-md); }

.reg-form__label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.reg-form__select,
.reg-form__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.95rem;
  background: var(--c-bg);
  color: var(--c-text);
  outline: none;
  transition: var(--transition);
}

.reg-form__select:focus,
.reg-form__input:focus { border-color: var(--c-gold); }

.reg-form__phone-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: var(--transition);
}

.reg-form__phone-wrap:focus-within { border-color: var(--c-gold); }

.reg-form__code {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--c-bg-accent);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-text-soft);
  border-left: 1px solid var(--c-border);
  direction: ltr;
  white-space: nowrap;
  min-width: 60px;
  justify-content: center;
}

.reg-form__phone-wrap .reg-form__input {
  border: none;
  border-radius: 0;
}

.reg-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--c-text-soft);
  cursor: pointer;
  line-height: 1.5;
}

.reg-form__checkbox input {
  margin-top: 4px;
  accent-color: var(--c-gold);
  flex-shrink: 0;
}

.reg-form__checkbox a {
  color: var(--c-gold);
  text-decoration: underline;
}

.reg-form__msg {
  margin-top: var(--space-sm);
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  text-align: center;
  font-weight: 500;
}

.reg-form__msg--success { background: rgba(58, 138, 92, 0.1); color: var(--c-success); }
.reg-form__msg--error { background: rgba(196, 80, 64, 0.1); color: var(--c-error); }

/* --- Footer --- */
.footer {
  background: var(--c-bg-dark);
  color: var(--c-text-light);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer__tagline {
  color: rgba(245, 240, 232, 0.5);
  font-size: 0.9rem;
  margin-top: var(--space-xs);
}

.footer__links h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.footer__links a {
  display: block;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.5);
  padding: 4px 0;
  transition: var(--transition);
}

.footer__links a:hover { color: var(--c-gold-light); }

.footer__bottom {
  border-top: 1px solid rgba(245, 240, 232, 0.1);
  padding-top: var(--space-md);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.3);
}

@media (max-width: 768px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer__inner { grid-template-columns: 1fr; text-align: center; }
}

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

.hero__badge { animation: fadeUp 0.6s ease both 0.1s; }
.hero__title { animation: fadeUp 0.6s ease both 0.2s; }
.hero__subtitle { animation: fadeUp 0.6s ease both 0.3s; }
.hero__actions { animation: fadeUp 0.6s ease both 0.4s; }
.hero__stats { animation: fadeUp 0.6s ease both 0.5s; }
.hero__visual { animation: fadeUp 0.8s ease both 0.6s; }

/* Scroll reveal */
.step, .earn-card, .faq-item, .country-tag {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.step.visible, .earn-card.visible, .faq-item.visible, .country-tag.visible {
  opacity: 1;
  transform: translateY(0);
}
