/* ===== Apaza — design tokens ===== */
:root {
  --accent: #7C5CFC;
  --accent-2: #22E6A6;
  --bg: #100e17;
  --bg-soft: #14121c;
  --surface: #1c1926;
  --surface-2: #201c2c;
  --border: #2c2838;
  --text: #f5f3fa;
  --text-muted: #a8a3b8;
  --text-faint: #726d82;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(120% 60% at 50% -10%, #241f36 0%, var(--bg-soft) 45%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  direction: rtl;
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-weight: 800;
  line-height: 1.45;
  text-wrap: pretty;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(16, 14, 23, 0.72);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #14121c;
  box-shadow: 0 14px 30px -12px var(--accent);
}
.btn-primary:hover { box-shadow: 0 18px 36px -10px var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-weight: 700;
}
.btn-ghost:hover { color: var(--text); border-color: #3a3550; }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: 12px; }
.btn-lg { padding: 18px 28px; font-size: 17px; width: 100%; max-width: 360px; }

/* ===== Screens (hero / building / success) ===== */
.screen { display: none; }
.screen.is-active { display: block; }

@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.screen.is-active > * { animation: screenIn .5s cubic-bezier(.2,.8,.2,1) both; }

/* ---- Hero ---- */
.hero {
  padding: 64px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
}
.hero-copy { max-width: 560px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--accent-2);
  background: rgba(34, 230, 166, 0.1);
  border: 1px solid rgba(34, 230, 166, 0.25);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(30px, 6vw, 46px);
  margin-bottom: 18px;
}
.hero h1 span { color: var(--accent-2); }
.hero p.lead {
  font-size: 16.5px;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 480px;
}
.hero-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.hero-note { font-size: 13px; color: var(--text-faint); }

.store-name-input {
  width: 100%;
  max-width: 360px;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: 'Tajawal', sans-serif;
  font-size: 15px;
  direction: rtl;
}
.store-name-input::placeholder { color: var(--text-faint); }
.store-name-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,0.18);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 40px;
  max-width: 480px;
}
.feature-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.feature-chip .icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.feature-chip span { font-size: 12px; color: #c9c5d6; }

/* ---- Phone preview card (decorative, desktop) ---- */
.phone-preview {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 390 / 700;
  border-radius: 32px;
  background: linear-gradient(160deg, var(--surface-2), var(--bg-soft));
  border: 1px solid var(--border);
  box-shadow: 0 40px 90px -35px rgba(0,0,0,.6);
  padding: 26px 20px;
  display: none;
}
.phone-preview .glow {
  position: absolute;
  top: -60px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .18;
  filter: blur(50px);
}
.phone-preview .mock-line { border-radius: 8px; background: rgba(255,255,255,.06); }
.phone-preview .mock-title { height: 16px; width: 70%; margin-bottom: 10px; }
.phone-preview .mock-sub { height: 10px; width: 90%; margin-bottom: 8px; }
.phone-preview .mock-sub.short { width: 60%; margin-bottom: 24px; }
.phone-preview .mock-card {
  height: 76px; border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.phone-preview .mock-btn {
  margin-top: 16px;
  height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: .9;
}

/* ---- Building ---- */
.building { padding: 90px 0; text-align: center; }
.building h2 { font-size: 21px; }
.building .sub { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

.ring-wrap {
  position: relative;
  width: 190px; height: 190px;
  margin: 40px auto 0;
}
.ring-wrap svg { transform: rotate(-90deg); }
.ring-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-num .pct { font-family: 'Cairo', sans-serif; font-weight: 900; font-size: 36px; }
.ring-num .elapsed { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

.steps {
  max-width: 420px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}
.step {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-faint);
  transition: color .2s ease;
}
.step .dot { flex-shrink: 0; width: 20px; height: 20px; position: relative; }
.step .dot svg { position: absolute; inset: 0; }
.step .dot .spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.step.is-active { color: var(--text); }
.step.is-done { color: var(--accent-2); }

/* ---- Success ---- */
.success { padding: 70px 0; text-align: center; }
.success-icon {
  width: 76px; height: 76px; margin: 0 auto;
  border-radius: 50%;
  background: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 40px -12px var(--accent-2);
}
.success h2 { font-size: 25px; margin-top: 20px; }
.success .sub { color: var(--text-muted); font-size: 14.5px; margin-top: 6px; }

.store-card {
  max-width: 360px;
  margin: 32px auto 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: right;
}
.store-card .store-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.store-card .store-head .badge {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.store-card .store-head strong { font-family: 'Cairo', sans-serif; font-size: 13.5px; }
.store-card .store-body {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.store-card .thumb { aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); }

.store-url {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: #c9c5d6;
  direction: ltr;
}

.subdomain-note {
  font-size: 11.5px;
  color: var(--text-faint);
  max-width: 320px;
  margin: 10px auto 0;
}

.success-actions {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 28px;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .hero-actions { align-items: flex-start; }
}

@media (min-width: 1024px) {
  .hero { padding: 96px 0 70px; }
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
  }
  .hero-copy { max-width: none; }
  .phone-preview { display: block; }
  .steps { text-align: right; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
  .feature-row { gap: 8px; }
}
