:root {
  --bg: #0d0d0d;
  --bg-soft: #121212;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f6f7;
  --text-muted: #9a9fa6;
  --accent: #33c3ec;
  --accent-soft: rgba(51, 195, 236, 0.12);
  --accent-glow: rgba(51, 195, 236, 0.35);
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 55% 40% at 12% 0%, rgba(51, 195, 236, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 45% at 100% 25%, rgba(51, 195, 236, 0.07), transparent 60%),
    radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 26px 26px;
  background-position: center top, center top, center top;
  background-repeat: no-repeat, no-repeat, repeat;
}

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

/* ---------- Navbar ---------- */

.navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.75);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.navbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand__mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a { transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn--outline {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--filled {
  background: var(--accent);
  color: #04222c;
  box-shadow: 0 0 0 1px rgba(51, 195, 236, 0.4), 0 8px 24px -8px var(--accent-glow);
}
.btn--filled:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(51, 195, 236, 0.6), 0 12px 28px -8px var(--accent-glow);
}

.navbar__cta { padding: 10px 20px; font-size: 0.9rem; }

/* ---------- Language switch ---------- */

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-soft);
  flex-shrink: 0;
  direction: ltr; /* FA | EN always reads in that order */
}

.lang-switch__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang-switch__btn:hover { color: var(--text); }

.lang-switch__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-switch__btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(51, 195, 236, 0.35);
}

/* Set by the inline head script only when a stored language differs from the
   language the HTML is authored in, so English visitors never see a flash of
   Persian. Cleared by lang-toggle.js (and by its own fail-safe timeout), and
   never set at all when JavaScript is off. */
html.i18n-pending body { visibility: hidden; }


/* ---------- Hero layout ---------- */

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 96px 32px 120px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 64px;
}

.hero__content {
  animation: rise 0.6s ease both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-soft);
  margin-bottom: 28px;
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(2.1rem, 3.4vw, 3.1rem);
  line-height: 1.35;
  font-weight: 800;
  margin: 0 0 20px;
}

.hero__underline {
  display: block;
  width: 72px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 26px;
}

.hero__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 2;
  max-width: 46ch;
  margin: 0 0 36px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Hero visual / diamond card ---------- */

.hero__visual {
  display: flex;
  justify-content: center;
  animation: rise 0.7s ease 0.1s both;
}

.hero__image {
  position: relative;
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  padding: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(51, 195, 236, 0.12), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.hero__image-bg {
  position: absolute;
  inset: 10px;
  border-radius: 12px;
  z-index: 0;
  overflow: hidden;
  background-color: #0e1414;
  background-image:
    linear-gradient(rgba(51, 195, 236, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 195, 236, 0.10) 1px, transparent 1px),
    radial-gradient(circle at 75% 15%, rgba(51, 195, 236, 0.22), transparent 55%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
}

.hero__image-bg svg {
  position: absolute;
  color: var(--accent);
  opacity: 0.4;
}
.hero__image-bg .icon--brackets { top: 18px; inset-inline-start: 20px; width: 46px; height: 46px; opacity: 0.32; }
.hero__image-bg .icon--braces   { bottom: 22px; inset-inline-end: 18px; width: 34px; height: 34px; opacity: 0.28; }
.hero__image-bg .icon--terminal { top: 26px; inset-inline-end: 22px; width: 30px; height: 30px; opacity: 0.3; }

.hero__image-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  margin-inline-end: -36px;
  margin-top: 71px;
}

.diamond-frame {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diamond {
  position: absolute;
  inset: 0;
  border: 1px dashed var(--border-strong);
  transform: rotate(45deg);
  border-radius: 6px;
}

.card {
  position: relative;
  width: 320px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px 18px 0;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.card__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.card__art {
  height: 190px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, rgba(51, 195, 236, 0.16), transparent 70%), #0a0a0a;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card__art-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(51, 195, 236, 0.35));
}

.card__stats {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.stat--divider { border-inline-end: 1px solid var(--border); }

.stat__label { font-size: 0.78rem; color: var(--text-muted); }
.stat__value { font-size: 1rem; font-weight: 700; }
.stat__value--accent { color: var(--accent); }

.card__progress {
  height: 3px;
  background: var(--border);
  margin: 0 -18px;
}

.card__progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Motion ---------- */

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__content, .hero__visual, .badge__dot { animation: none; }
}

/* ---------- Responsive ---------- */

.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  cursor: pointer;
  flex-shrink: 0;
}

.navbar__toggle span {
  width: 16px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.navbar__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.navbar__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__underline { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__desc { margin-inline: auto; }

  .navbar__toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 24px 18px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .navbar__inner { padding: 14px 18px; }
  .hero { padding: 56px 18px 80px; }
  .diamond-frame, .card { width: 260px; }
}

@media (max-width: 400px) {
  .navbar__cta { display: none; }
  .navbar__inner { gap: 12px; }
  .lang-switch__btn { padding: 5px 9px; font-size: 0.72rem; }
}

/* ---------- Minimal footer (فقط کپی‌رایت) ---------- */

.site-footer-mini {
  border-top: 1px solid var(--border);
  padding: 20px 32px;
  text-align: center;
}

.site-footer-mini span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
