/* ================= لایهٔ گرافیکی ================= */

/* تیترها و عددها با فونتِ هندسی، متن با Inter */
.hero-title, .swap-head h1, .strip b, .brand b, #amount, #sell-amount, .amount-out {
  font-family: "Space Grotesk", Inter, sans-serif;
}

/* شبکهٔ کم‌رنگ که به لبه‌ها محو می‌شود */
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(120,160,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
}

/* ---------- هیرو ---------- */
.hero { text-align: center; padding: 18px 0 26px; }
.live {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--mint);
  background: rgba(23,209,160,.08); border: 1px solid rgba(23,209,160,.25);
  padding: 5px 13px; border-radius: 999px;
}
.live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 0 rgba(23,209,160,.6); animation: ping 1.8s infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(23,209,160,0); } 100% { box-shadow: 0 0 0 0 rgba(23,209,160,0); } }
.hero-title {
  font-size: clamp(32px, 8vw, 46px); line-height: 1.08; letter-spacing: -1.5px;
  margin: 16px 0 10px; font-weight: 700;
}
.grad {
  background: linear-gradient(100deg, #7fd4ff, #2aa3ff 45%, #7fd4ff 90%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 6s linear infinite;
}
@keyframes flow { to { background-position: 200% center; } }
.hero-sub { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 auto; max-width: 340px; }

/* ---------- نورِ چرخانِ دورِ کارت (border beam) ---------- */
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.swap { position: relative; isolation: isolate; }
.swap > .beam {
  position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--a), transparent 0 70%, #1f7fe0 80%, #6cc8ff 90%, #eaf6ff 95%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite; pointer-events: none; z-index: 1;
}
@keyframes spin { to { --a: 360deg; } }

/* نوری که دنبالِ موس می‌آید */
.swap > .spot {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(52,162,255,.10), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.swap:hover > .spot { opacity: 1; }

/* ---------- برق‌زدنِ دکمهٔ اصلی ---------- */
.cta { position: relative; overflow: hidden; }
.cta:not(:disabled)::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 60%, 100% { transform: translateX(100%); } }

/* فلشِ وسط با هاور می‌چرخد */
.arrow { transition: transform .35s cubic-bezier(.3,1.6,.5,1), border-color .2s; }
.swap:hover .arrow { transform: translateY(2px) scale(1.08); border-color: #13203a; }

/* ---------- ورودِ پله‌ای ---------- */
.reveal { animation: rise-in .7s cubic-bezier(.2,.8,.2,1) both; }
.hero.reveal { animation-delay: .05s; }
.swap.reveal { animation-delay: .15s; }
.strip.reveal { animation-delay: .28s; }
.card.reveal { animation-delay: .38s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } }

/* لوگو کمی شناور */
.brand img { animation: bob 5s ease-in-out infinite; box-shadow: 0 6px 20px -6px rgba(52,162,255,.55); }
@keyframes bob { 50% { transform: translateY(-2px); } }

@media (prefers-reduced-motion: reduce) {
  .swap > .beam, .grad, .cta::after, .reveal, .brand img, .live i { animation: none !important; }
}

