/* ══════════════════════════════════════════════════════════
   ROYA START PAGE v4 — Mobile-First Luxury Mini-App
   Multi-step | Swipe Gallery | Map | Animated Counters
   ══════════════════════════════════════════════════════════ */

/* ─── VARIABLES ─── */
:root {
  --bg:          #0a0a0a;
  --surface:     #141414;
  --surface2:    #1a1a1a;
  --gold:        #D4AF37;
  --gold-dim:    rgba(212,175,55,.15);
  --gold-border: rgba(212,175,55,.35);
  --border:      rgba(255,255,255,.10);
  --text:        #f0f0f0;
  --muted:       rgba(255,255,255,.60);
  --radius:      14px;
  --radius-sm:   10px;
  --font-display:'Playfair Display', Georgia, serif;
  --font-body:   'Inter', 'Noto Kufi Arabic', system-ui, sans-serif;
  --font-ar:     'Noto Kufi Arabic', 'Inter', system-ui, sans-serif;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { font-family: var(--font-ar); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }


/* ═══════════════════════════════════════
   LANG TOGGLE
   ═══════════════════════════════════════ */
.lang-bar {
  position: fixed; top: 16px; left: 16px; z-index: 100;
  display: flex; border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
[dir="rtl"] .lang-bar { left: auto; right: 16px; }
.lang-bar a {
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  color: var(--muted); transition: all .25s ease; letter-spacing: .02em;
}
.lang-bar a.active { background: var(--gold-dim); color: #fff; }


/* ═══════════════════════════════════════
   DEVELOPER LOGO
   ═══════════════════════════════════════ */
.dev-logo {
  height: 40px; width: auto; margin: 0 auto 16px;
  filter: brightness(0) invert(1);
  opacity: .85;
}
.dev-logo-section {
  height: 36px; width: auto; margin: 0 auto 20px;
  opacity: .7;
}


/* ═══════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════ */
.hero {
  position: relative; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 20px 40px; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover; transform: scale(1.03);
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg,
    rgba(0,0,0,.25) 0%, rgba(0,0,0,.50) 30%,
    rgba(0,0,0,.80) 60%, rgba(10,10,10,.98) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  max-width: 520px; margin: 0 auto; width: 100%;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 5.5vw, 48px); font-weight: 700;
  line-height: 1.15; text-shadow: 0 8px 40px rgba(0,0,0,.6);
  margin-bottom: 10px; text-align: center;
}
[dir="rtl"] .hero__title { font-family: var(--font-ar); letter-spacing: 0; }
.hero__sub {
  font-size: clamp(13px, 2.2vw, 16px); color: var(--muted);
  text-align: center; max-width: 420px; margin: 0 auto 24px; line-height: 1.7;
}


/* ═══════════════════════════════════════
   FORM CARD + MULTI-STEP
   ═══════════════════════════════════════ */
.form-card {
  background: rgba(20,20,20,.80);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px; padding: 0 20px 20px; overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
}

/* Progress bar */
.progress-bar {
  height: 3px; background: rgba(255,255,255,.08);
  border-radius: 0; margin: 0 -20px;
}
.progress-fill {
  height: 100%; background: var(--gold);
  border-radius: 0 3px 3px 0;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

.step-indicator {
  text-align: center; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,.75); padding: 14px 0 4px;
  letter-spacing: .04em; text-transform: uppercase;
}

.step-title {
  font-size: 18px; font-weight: 700; text-align: center;
  margin-bottom: 20px; padding-top: 4px;
}

/* Form step transitions */
.form-step {
  transition: opacity .3s ease, transform .3s ease;
}
.form-step.sliding-out {
  opacity: 0; transform: translateX(-30px); pointer-events: none;
}
[dir="rtl"] .form-step.sliding-out { transform: translateX(30px); }
.form-step.sliding-in {
  opacity: 0; transform: translateX(30px);
}
[dir="rtl"] .form-step.sliding-in { transform: translateX(-30px); }

.form-error {
  padding: 12px 16px; margin: 12px 0;
  border-radius: var(--radius-sm);
  background: rgba(255,60,60,.12); border: 1px solid rgba(255,60,60,.25);
  color: #ffd0d0; font-size: 13px; text-align: center;
}

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.92); margin-bottom: 8px;
}
[dir="rtl"] .field label { text-align: right; }
[dir="ltr"] .field label { text-align: left; }

.field input,
.field select,
.field textarea {
  width: 100%; padding: 14px 16px;
  background: rgba(255,255,255,.05); color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
  outline: none; transition: border-color .2s ease, background .2s ease;
  -webkit-appearance: none; appearance: none;
}
/* ── FIX: Dark dropdown options (native select) ── */
.field select {
  background-color: #1a1a1a;
  color: #f0f0f0;
}
.field select option {
  background-color: #1a1a1a;
  color: #f0f0f0;
  padding: 12px 16px;
  font-size: 15px;
}
.field select option:checked {
  background-color: rgba(212,175,55,.25);
  color: #fff;
}
.field select option:hover {
  background-color: rgba(255,255,255,.10);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.45); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold-border); background: rgba(255,255,255,.07);
}

/* intl-tel-input overrides */
.iti { width: 100%; }
.iti__tel-input {
  width: 100% !important; padding: 14px 16px 14px 52px !important;
  background: rgba(255,255,255,.05) !important; color: var(--text) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: var(--radius-sm) !important; font-size: 15px !important;
  font-family: inherit !important;
}
[dir="rtl"] .iti__tel-input { padding: 14px 52px 14px 16px !important; }
.iti__tel-input:focus {
  border-color: var(--gold-border) !important;
  background: rgba(255,255,255,.07) !important;
}
.iti__country-container { border: none !important; }
.iti__dropdown-content {
  background: #1a1a1a !important; border: 1px solid rgba(255,255,255,.15) !important;
  border-radius: 12px !important;
}
.iti__search-input {
  background: rgba(255,255,255,.08) !important; color: var(--text) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}
.iti__country {
  padding: 8px 10px !important; color: var(--text) !important;
}
.iti__country:hover, .iti__country--highlight {
  background: rgba(212,175,55,.15) !important;
}
.iti__dial-code { color: var(--muted) !important; }

/* Select wrapper */
.select-wrap { position: relative; }
.select-wrap select { padding-right: 40px; cursor: pointer; }
[dir="rtl"] .select-wrap select { padding-right: 16px; padding-left: 40px; }
.select-wrap .chevron {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
[dir="rtl"] .select-wrap .chevron { right: auto; left: 14px; }

/* Buttons */
.btn-submit {
  display: block; width: 100%; padding: 16px; border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #D4AF37 0%, #C49B26 50%, #B8922A 100%);
  color: #1a1306; font-size: 16px; font-weight: 700; font-family: inherit;
  cursor: pointer; box-shadow: 0 4px 20px rgba(212,175,55,.25);
  letter-spacing: .02em; text-align: center;
  transition: transform .15s ease, box-shadow .25s ease;
}
.btn-submit:hover { box-shadow: 0 8px 30px rgba(212,175,55,.35); }
.btn-submit:active { transform: scale(.98); }

.btn-ghost {
  display: block; width: 100%; padding: 14px; border: none;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06); color: var(--muted);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.10); }

.step-actions {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px;
}

.form-note {
  margin-top: 12px; font-size: 11px;
  color: rgba(255,255,255,.40); text-align: center; line-height: 1.5;
}


/* ═══════════════════════════════════════
   SWIPEABLE GALLERY
   ═══════════════════════════════════════ */
.gallery-section {
  padding: 8px 0; background: var(--bg); overflow: hidden;
}
.gallery-swipe {
  position: relative; overflow: hidden;
  margin: 0 16px; border-radius: 16px;
}
.gallery-track {
  display: flex; transition: transform .35s cubic-bezier(.4,0,.2,1);
  cursor: grab; user-select: none; -webkit-user-select: none;
}
.gallery-track:active { cursor: grabbing; }
.gallery-slide {
  flex: 0 0 100%; min-width: 100%;
}
.gallery-slide img {
  width: 100%; height: 260px; object-fit: cover;
  border-radius: 16px; pointer-events: none;
}
.gallery-dots {
  display: flex; justify-content: center; gap: 8px;
  padding: 14px 0 6px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.25); transition: all .3s ease;
  cursor: pointer;
}
.dot.active { background: var(--gold); width: 24px; border-radius: 4px; }

@media (min-width: 768px) {
  .gallery-swipe { margin: 0 auto; max-width: 900px; }
  .gallery-slide img { height: 400px; }
}


/* ═══════════════════════════════════════
   GALLERY NOTE + PROJECT BADGE
   ═══════════════════════════════════════ */
.gallery-note {
  text-align: center; font-size: 11px; color: var(--muted);
  padding: 8px 16px; opacity: 0.7; font-style: italic;
  letter-spacing: .02em;
}

/* Explore Interactive Map Link */
.explore-map-link {
  display: block; text-align: center; margin: 14px auto 0;
  font-size: 12px; font-weight: 700; color: var(--accent);
  text-decoration: none; opacity: 0.85; transition: opacity .2s;
  letter-spacing: .03em;
}
.explore-map-link:hover { opacity: 1; text-decoration: underline; }
.project-badge {
  display: inline-block; margin: 10px auto 6px;
  padding: 5px 18px; border-radius: 20px;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; animation: badgePulse 2.5s ease-in-out infinite;
}
.badge-gold { background: linear-gradient(135deg, #d4a843, #f5d98e); color: #1a1a1a; }
.badge-red { background: linear-gradient(135deg, #dc2626, #f87171); color: #fff; }
.badge-green { background: linear-gradient(135deg, #059669, #34d399); color: #fff; }
.badge-blue { background: linear-gradient(135deg, #2563eb, #60a5fa); color: #fff; }
.badge-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; }
@keyframes badgePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ═══════════════════════════════════════
   DESCRIPTION + HIGHLIGHTS
   ═══════════════════════════════════════ */
.desc-section {
  padding: 48px 20px; background: var(--bg); text-align: center;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 4.5vw, 34px); font-weight: 700;
  margin-bottom: 14px; color: var(--gold);
}
[dir="rtl"] .section-title { font-family: var(--font-ar); }
.desc-text {
  max-width: 580px; margin: 0 auto 28px;
  font-size: 14px; color: var(--muted); line-height: 1.7;
}

.highlight-cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; max-width: 520px; margin: 0 auto;
}
.hl-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 16px; text-align: center;
}
.hl-emoji { font-size: 28px; margin-bottom: 8px; }
.hl-value {
  font-size: 22px; font-weight: 800; line-height: 1.2; margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.hl-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}

/* Counter animation */
.counter { transition: opacity .2s; }

@media (min-width: 768px) {
  .highlight-cards { grid-template-columns: repeat(3, 1fr); max-width: 700px; }
}


/* ═══════════════════════════════════════
   FEATURES
   ═══════════════════════════════════════ */
.features-section {
  padding: 48px 20px; background: var(--surface); text-align: center;
}
.section-sub { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.features-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; max-width: 520px; margin: 0 auto;
}
.feat-card {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 14px; text-align: center;
  transition: border-color .25s ease;
}
.feat-card:hover { border-color: var(--gold-border); }
.feat-icon { font-size: 32px; margin-bottom: 10px; }
/* Lottie icon inside feature cards */
.feat-icon lottie-player,
.feat-icon dotlottie-player {
  width: 48px; height: 48px; margin: 0 auto;
}
.hl-emoji lottie-player,
.hl-emoji dotlottie-player {
  width: 40px; height: 40px; margin: 0 auto;
}
.feat-label { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.feat-sub { font-size: 12px; color: var(--muted); }

@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); max-width: 800px; }
}


/* ═══════════════════════════════════════
   MAP SECTION
   ═══════════════════════════════════════ */
.map-section {
  padding: 48px 20px; background: var(--bg); text-align: center;
}
.map-label {
  font-size: 14px; color: var(--muted); margin-bottom: 16px;
}
.map-container {
  max-width: 600px; margin: 0 auto;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
  height: 280px;
}
.map-container iframe {
  width: 100%; height: 100%; border: 0;
  filter: invert(.9) hue-rotate(180deg) brightness(1.1) contrast(.9);
}
@media (min-width: 768px) {
  .map-container { height: 360px; }
}


/* ═══════════════════════════════════════
   BOTTOM CTA
   ═══════════════════════════════════════ */
.cta-section {
  padding: 48px 20px 80px; background: var(--bg); text-align: center;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 38px); font-weight: 700;
  line-height: 1.15; margin-bottom: 12px;
}
[dir="rtl"] .cta-title { font-family: var(--font-ar); }
.cta-sub {
  font-size: 14px; color: var(--muted);
  max-width: 420px; margin: 0 auto 28px; line-height: 1.6;
}
.cta-scroll-btn {
  max-width: 360px; margin: 0 auto;
}


/* ═══════════════════════════════════════
   WHATSAPP FAB
   ═══════════════════════════════════════ */
.wa-fab {
  position: fixed; bottom: 20px; left: 20px; z-index: 100;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  background: #25D366; color: #06240f;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 32px rgba(37,211,102,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
[dir="rtl"] .wa-fab { left: auto; right: 20px; }
.wa-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(37,211,102,.45); }
.wa-fab svg { width: 20px; height: 20px; flex-shrink: 0; }


/* ═══════════════════════════════════════
   DESKTOP
   ═══════════════════════════════════════ */
@media (min-width: 768px) {
  .hero { padding: 100px 40px 60px; }
  .hero__content { max-width: 600px; }
  .form-card { padding: 0 28px 24px; }
  .desc-section, .features-section, .cta-section, .map-section { padding: 64px 40px; }
}


/* ═══════════════════════════════════════
   SITE NAV (Back to website + links)
   ═══════════════════════════════════════ */
.site-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  padding: 24px 20px 40px; background: var(--bg); text-align: center;
}
.site-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background .2s ease, transform .15s ease;
}
.site-nav a:active { transform: scale(.97); }
.site-nav__home {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: var(--text);
}
.site-nav__home:hover { background: rgba(255,255,255,.14); }
.site-nav__home svg { width: 16px; height: 16px; }
.site-nav__link {
  background: transparent; border: 1px solid rgba(255,255,255,.10);
  color: var(--muted);
}
.site-nav__link:hover { background: rgba(255,255,255,.06); color: var(--text); }
.site-nav__divider {
  width: 1px; height: 20px; background: rgba(255,255,255,.10);
  margin: 0 4px;
}


/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__title  { animation: fadeUp .7s ease both; }
.hero__sub    { animation: fadeUp .7s ease .12s both; }
.dev-logo     { animation: fadeUp .5s ease .05s both; }
.form-card    { animation: fadeUp .7s ease .25s both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
