/* landing page */
:root {
  --hm-bg: #06070f;
  --hm-bg-2: #0c0e1d;
  --hm-panel: rgba(255, 255, 255, .045);
  --hm-line: rgba(255, 255, 255, .09);
  --hm-text: #eef1fb;
  --hm-muted: #99a1bd;
  --hm-brand: #7c5cff;
  --hm-brand-2: #00d4ff;
  --hm-brand-3: #5bffbc;
  --hm-shadow: 0 22px 60px rgba(0, 0, 0, .45);
}

/* light theme */
body.light-theme {
  --hm-bg: #f4f6fc;
  --hm-bg-2: #e9edf8;
  --hm-panel: rgba(255, 255, 255, .78);
  --hm-line: rgba(20, 26, 56, .1);
  --hm-text: #141a38;
  --hm-muted: #59608a;
  --hm-brand: #5b3df0;
  --hm-brand-2: #0083c8;
  --hm-brand-3: #0f9f7a;
  --hm-shadow: 0 22px 50px rgba(30, 40, 90, .13);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Vazirmatn", sans-serif;
  background: var(--hm-bg);
  color: var(--hm-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, picture, canvas { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* hm shell */
.hm-shell {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity .45s ease;
}

.hm-shell.ready { opacity: 1; }

/* hm wrap */
.hm-wrap {
  width: min(1180px, 100% - 2.4rem);
  margin-inline: auto;
}

/* hm loader */
.hm-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  gap: 0;
  background: radial-gradient(circle at 50% 40%, var(--hm-bg-2), var(--hm-bg) 70%);
  transition: opacity .5s ease, visibility .5s ease;
}

.hm-loader.done { opacity: 0; visibility: hidden; }

.hm-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.hm-loader-atom {
  position: relative;
  width: 128px;
  height: 128px;
}

.hm-loader-ring {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--hm-brand);
  border-inline-end-color: var(--hm-brand-2);
  border-radius: 50%;
  animation: hmSpin 2.4s linear infinite;
}

.hm-loader-ring:nth-child(2) {
  inset: 14px;
  border-top-color: var(--hm-brand-2);
  border-inline-end-color: var(--hm-brand-3);
  animation-duration: 1.7s;
  animation-direction: reverse;
}

.hm-loader-ring:nth-child(3) {
  inset: 28px;
  border-top-color: var(--hm-brand-3);
  border-inline-end-color: var(--hm-brand);
  animation-duration: 3.1s;
}

.hm-loader-core {
  position: absolute;
  inset: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  box-shadow: 0 0 26px rgba(124, 92, 255, .55);
  animation: hmPulse 1.8s ease-in-out infinite;
}

@keyframes hmSpin { to { transform: rotate(360deg); } }
@keyframes hmPulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* hm loader */
.hm-loader-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .04em;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hm-loader-track {
  width: 190px;
  height: 3px;
  border-radius: 3px;
  background: var(--hm-line);
  overflow: hidden;
}

.hm-loader-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--hm-brand), var(--hm-brand-2));
  transition: width .28s ease;
}

/* hm backdrop */
.hm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% -10%, rgba(124, 92, 255, .2), transparent 62%),
    radial-gradient(52rem 38rem at 12% 8%, rgba(0, 212, 255, .15), transparent 60%),
    linear-gradient(180deg, var(--hm-bg) 0%, var(--hm-bg-2) 55%, var(--hm-bg) 100%);
}

body.light-theme .hm-backdrop {
  background:
    radial-gradient(60rem 40rem at 78% -10%, rgba(91, 61, 240, .12), transparent 62%),
    radial-gradient(52rem 38rem at 12% 8%, rgba(0, 131, 200, .1), transparent 60%),
    linear-gradient(180deg, var(--hm-bg) 0%, #fff 55%, var(--hm-bg) 100%);
}

/* hm grid */
.hm-grid-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(var(--hm-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hm-line) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at 50% 30%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 10%, transparent 72%);
}

/* hm header */
.hm-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: rgba(6, 7, 15, .74);
  background: color-mix(in srgb, var(--hm-bg) 72%, transparent);
  border-bottom: 1px solid var(--hm-line);
}

.hm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 66px;
}

/* hm brand */
.hm-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

.hm-brand img { width: 38px; height: 38px; }

.hm-brand strong {
  font-size: 1.08rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* hm nav */
.hm-nav {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-inline-start: auto;
}

.hm-nav a {
  padding: .45rem .8rem;
  border-radius: 10px;
  font-size: .85rem;
  color: var(--hm-muted);
  transition: color .18s ease, background .18s ease;
}

.hm-nav a:hover { color: var(--hm-text); background: var(--hm-panel); }

/* hm header */
.hm-header-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
}

/* hm cta */
.hm-cta-sm {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .95rem;
  border-radius: 12px;
  font-size: .84rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  box-shadow: 0 6px 18px rgba(124, 92, 255, .3);
}

.hm-cta-sm .icon { width: .85rem; height: .85rem; }

/* hm hero */
.hm-hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
}

.hm-hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .85;
}

.hm-hero-canvas canvas { width: 100%; height: 100%; }

.hm-hero-canvas.hero-visual-fallback canvas { display: none; }

.hm-hero-canvas.hero-visual-fallback {
  background:
    radial-gradient(circle at 58% 42%, rgba(124, 92, 255, .24) 0%, transparent 55%),
    radial-gradient(circle at 32% 62%, rgba(0, 212, 255, .18) 0%, transparent 52%);
}

.hm-hero-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 30%, var(--hm-bg) 95%);
}

.hm-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(1.6rem, 4vw, 3.4rem);
}

/* hm chip */
.hm-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .38rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--hm-line);
  background: var(--hm-panel);
  font-size: .76rem;
  color: var(--hm-muted);
  margin-bottom: 1.1rem;
}

.hm-chip .icon { width: .8rem; height: .8rem; color: var(--hm-brand-2); }

/* hm title */
.hm-title {
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.hm-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2) 55%, var(--hm-brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* hm lead */
.hm-lead {
  margin-top: 1.05rem;
  max-width: 34rem;
  font-size: clamp(.92rem, 1.6vw, 1.03rem);
  line-height: 2;
  color: var(--hm-muted);
}

/* hm hero */
.hm-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.7rem;
}

/* hm btn */
.hm-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: 14px;
  font-size: .92rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.hm-btn .icon { width: .95rem; height: .95rem; }

.hm-btn-main {
  color: #fff;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  box-shadow: 0 12px 30px rgba(124, 92, 255, .32);
}

.hm-btn-main:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(124, 92, 255, .42); }

.hm-btn-ghost {
  color: var(--hm-text);
  border-color: var(--hm-line);
  background: var(--hm-panel);
}

.hm-btn-ghost:hover { transform: translateY(-2px); }

/* hm stats */
.hm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hm-line);
}

/* hm stat */
.hm-stat b {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hm-stat span { font-size: .78rem; color: var(--hm-muted); }

/* hm stage */
.hm-stage {
  position: relative;
  perspective: 1300px;
  perspective-origin: 50% 45%;
}

/* hm card3d */
.hm-card3d {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--hm-line);
  background: var(--hm-panel);
  box-shadow: var(--hm-shadow);
  padding: .7rem;
  transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -12deg));
  transform-style: preserve-3d;
  transition: transform .3s cubic-bezier(.2, .7, .3, 1);
  backdrop-filter: blur(10px);
}

.hm-card3d-bar {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .1rem .45rem .55rem;
}

.hm-card3d-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hm-line);
}

.hm-card3d-bar i:first-child { background: #ff5f57; }
.hm-card3d-bar i:nth-child(2) { background: #febc2e; }
.hm-card3d-bar i:nth-child(3) { background: #28c840; }

.hm-card3d picture,
.hm-card3d img {
  border-radius: 15px;
  width: 100%;
  height: auto;
}

/* hm float */
.hm-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .6rem .85rem;
  border-radius: 15px;
  border: 1px solid var(--hm-line);
  background: rgba(12, 14, 29, .92);
  background: color-mix(in srgb, var(--hm-bg-2) 92%, transparent);
  box-shadow: var(--hm-shadow);
  transform: translateZ(70px);
  animation: hmFloat 6s ease-in-out infinite;
}

body.light-theme .hm-header { background: rgba(255, 255, 255, .8); }

body.light-theme .hm-float { background: rgba(255, 255, 255, .94); }

.hm-float-a { top: 8%; inset-inline-start: -8%; }
.hm-float-b { bottom: 10%; inset-inline-end: -6%; animation-delay: 1.8s; }

.hm-float .icon { width: 1rem; height: 1rem; color: var(--hm-brand-2); }

.hm-float b { font-size: .82rem; font-weight: 700; }
.hm-float span { display: block; font-size: .68rem; color: var(--hm-muted); }

@keyframes hmFloat {
  0%, 100% { transform: translateZ(70px) translateY(0); }
  50% { transform: translateZ(70px) translateY(-10px); }
}

/* hm elem */
.hm-elem-tile {
  position: absolute;
  top: -6%;
  inset-inline-end: 8%;
  width: 84px;
  padding: .6rem;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(150deg, var(--hm-brand), var(--hm-brand-2));
  box-shadow: 0 16px 34px rgba(124, 92, 255, .4);
  transform: translateZ(110px) rotate(-6deg);
  animation: hmTilt 7s ease-in-out infinite;
}

.hm-elem-tile small { display: block; font-size: .6rem; opacity: .85; }
.hm-elem-tile strong { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.hm-elem-tile span { font-size: .62rem; opacity: .9; }

@keyframes hmTilt {
  0%, 100% { transform: translateZ(110px) rotate(-6deg); }
  50% { transform: translateZ(110px) rotate(2deg) translateY(-8px); }
}

.hm-section { padding: clamp(2.8rem, 6vw, 5rem) 0; position: relative; z-index: 1; }

.hm-head { text-align: center; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }

/* hm head */
.hm-head h2 {
  font-size: clamp(1.4rem, 3.4vw, 2.15rem);
  font-weight: 800;
}

.hm-head h2 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hm-head p { margin-top: .6rem; color: var(--hm-muted); font-size: .9rem; }

/* hm slider */
.hm-slider {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--hm-line);
  background: var(--hm-panel);
  box-shadow: var(--hm-shadow);
  overflow: hidden;
}

/* hm track */
.hm-track {
  display: flex;
  touch-action: pan-y;
  cursor: grab;
  transition: transform .55s cubic-bezier(.3, .8, .3, 1);
}

.hm-track.dragging { transition: none; cursor: grabbing; }

/* hm slide */
.hm-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 1.4rem;
  padding: 1.1rem;
}

.hm-slide-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--hm-line);
  background: var(--hm-bg-2);
}

.hm-slide-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.hm-slide-body { padding-inline: .4rem; }

.hm-slide-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: .85rem;
  background: linear-gradient(135deg, rgba(124, 92, 255, .22), rgba(0, 212, 255, .18));
  border: 1px solid var(--hm-line);
}

.hm-slide-icon .icon { width: 1.25rem; height: 1.25rem; color: var(--hm-brand-2); }

.hm-slide-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.hm-slide-body p { font-size: .87rem; line-height: 1.95; color: var(--hm-muted); }

/* hm slider */
.hm-slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-top: 1.1rem;
}

/* hm arrow */
.hm-arrow {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--hm-line);
  background: var(--hm-panel);
  color: var(--hm-text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .18s ease;
}

.hm-arrow:hover { background: color-mix(in srgb, var(--hm-brand) 18%, transparent); }
.hm-arrow .icon { width: .9rem; height: .9rem; }
.hm-arrow.prev .icon { transform: scaleX(-1); }

.hm-dots { display: flex; gap: .45rem; }

/* hm dot */
.hm-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: var(--hm-line);
  transition: width .25s ease, background .25s ease;
}

.hm-dot.active {
  width: 26px;
  background: linear-gradient(90deg, var(--hm-brand), var(--hm-brand-2));
}

/* hm features */
.hm-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

/* hm feature */
.hm-feature {
  padding: 1.4rem 1.2rem;
  border-radius: 18px;
  border: 1px solid var(--hm-line);
  background: var(--hm-panel);
  transition: transform .2s ease, border-color .2s ease;
}

.hm-feature:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--hm-brand) 45%, transparent);
}

.hm-feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: .9rem;
  background: linear-gradient(135deg, rgba(124, 92, 255, .2), rgba(0, 212, 255, .16));
  border: 1px solid var(--hm-line);
}

.hm-feature-icon .icon { width: 1.3rem; height: 1.3rem; color: var(--hm-brand-2); }

.hm-feature h3 { font-size: .98rem; font-weight: 700; margin-bottom: .45rem; }
.hm-feature p { font-size: .83rem; line-height: 1.9; color: var(--hm-muted); }

/* hm band */
.hm-band {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.4rem;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: 24px;
  border: 1px solid var(--hm-line);
  background:
    radial-gradient(30rem 18rem at 88% 10%, rgba(124, 92, 255, .22), transparent 65%),
    var(--hm-panel);
  box-shadow: var(--hm-shadow);
}

.hm-band h2 { font-size: clamp(1.2rem, 2.8vw, 1.7rem); font-weight: 800; }
.hm-band p { margin-top: .55rem; color: var(--hm-muted); font-size: .88rem; line-height: 1.9; }
.hm-band-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* hm footer */
.hm-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--hm-line);
  padding: 2rem 0 1.4rem;
}

.hm-footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.hm-footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.hm-footer-links a { font-size: .85rem; color: var(--hm-muted); }
.hm-footer-links a:hover { color: var(--hm-brand-2); }

/* hm copy */
.hm-copy {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--hm-line);
  text-align: center;
  font-size: .76rem;
  color: var(--hm-muted);
}

/* hm fab */
.hm-fab {
  position: fixed;
  bottom: 1.6rem;
  inset-inline-start: 1.6rem;
  z-index: 70;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--hm-brand), var(--hm-brand-2));
  box-shadow: 0 12px 30px rgba(124, 92, 255, .42);
  transition: transform .2s ease;
}

.hm-fab:hover { transform: translateY(-3px) scale(1.04); }
.hm-fab .icon { width: 1.5rem; height: 1.5rem; }

/* hm reveal */
.hm-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}

.hm-reveal.shown { opacity: 1; transform: none; }

/* narrow 960px */
@media (max-width: 960px) {
  .hm-hero-grid { grid-template-columns: 1fr; }
  .hm-stage { order: -1; margin-bottom: 1rem; }
  .hm-card3d { transform: none; }
  .hm-float-a { inset-inline-start: 0; }
  .hm-float-b { inset-inline-end: 0; }
  .hm-band { grid-template-columns: 1fr; }
}

/* narrow 780px */
@media (max-width: 780px) {
  .hm-nav { display: none; }
  .hm-slide { grid-template-columns: 1fr; gap: 1rem; }
  .hm-slide-body { padding-inline: .2rem; }
  .hm-elem-tile { display: none; }
  .hm-float { transform: none; animation: none; }
  .hm-float-a { top: 4%; }
  .hm-float-b { bottom: 4%; }
}

/* mobile 560px */
@media (max-width: 560px) {
  .hm-wrap { width: calc(100% - 1.6rem); }
  .hm-cta-sm span { display: none; }
  .hm-cta-sm { padding: .5rem .65rem; }
  .hm-float { padding: .45rem .6rem; }
  .hm-float span { display: none; }
  .hm-stats { gap: 1.1rem; }
  .hm-stat b { font-size: 1.35rem; }
  .hm-fab { width: 48px; height: 48px; bottom: 1rem; inset-inline-start: 1rem; }
}

html[data-perf-tier="very-low"] .hm-grid-lines,
html[data-perf-tier="low"] .hm-grid-lines,
html[data-perf-tier="very-low"] .hm-hero-canvas { display: none; }

html[data-perf-tier="very-low"] .hm-card3d,
html[data-perf-tier="low"] .hm-card3d,
html[data-perf-tier="very-low"] .hm-header,
html[data-perf-tier="low"] .hm-header,
html[data-perf-tier="very-low"] .hm-float,
html[data-perf-tier="low"] .hm-float { backdrop-filter: none; }

html[data-perf-tier="very-low"] .hm-float,
html[data-perf-tier="very-low"] .hm-elem-tile,
html[data-perf-tier="low"] .hm-float,
html[data-perf-tier="low"] .hm-elem-tile { animation: none; }

html[data-perf-tier="very-low"] .hm-reveal { opacity: 1; transform: none; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hm-float, .hm-elem-tile, .hm-loader-ring, .hm-loader-core { animation: none; }
  .hm-reveal { opacity: 1; transform: none; transition: none; }
}
