/* ==========================================================================
   ISM WoW -- design tokens
   Palette: near-black violet ground, vivid purple primary, warm gold as
   the single contrast accent (echoes WoW's own UI gold), soft lavender
   for secondary text. Two type roles: Space Grotesk for display (sharp,
   geometric, a little technical), Inter for body in English, Vazirmatn
   for body in Persian (production should self-host both rather than
   pull from a CDN -- see deployment notes).
   ========================================================================== */
:root {
  --bg:            #0B0612;
  --bg-raised:     #15101F;
  --bg-raised-2:   #1C1429;
  --purple:        #7C3AED;
  --purple-dim:    #5B21B6;
  --purple-glow:   #A78BFA;
  --lavender:      #C4A5FF;
  --gold:          #FFD45E;
  --text:          #F1ECFA;
  --text-dim:      #9D8FBE;
  --border:        rgba(167, 139, 250, 0.18);
  --border-strong: rgba(167, 139, 250, 0.35);

  --font-display: "Space Grotesk", "Vazirmatn", sans-serif;
  --font-body-en: "Inter", sans-serif;
  --font-body-fa: "Vazirmatn", "Inter", sans-serif;

  --radius: 14px;
  --container-w: 1180px;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("https://fonts.gstatic.com/s/spacegrotesk/v16/V8mQoQDjQSkFtoMM3T6r8E7mPb54C-s.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("https://rsms.me/inter/font-files/Inter-roman.var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
/* Production note: replace the @font-face src URLs above with self-hosted
   files (e.g. /static/fonts/...) before going live -- per the deployment
   guide, this avoids any dependency on a third-party CDN being reachable
   from inside Iran. Vazirmatn should be self-hosted from day one the same
   way; no @font-face for it is declared here because the OS/browser will
   fall back to its own bundled Vazirmatn-like glyphs only if you've
   already got it installed locally during development -- add the real
   @font-face block once the .woff2 files are in /static/fonts/. */

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body-en);
  line-height: 1.6;
  overflow-x: hidden;
}
body.font-fa { font-family: var(--font-body-fa); }

h1, h2, h3, .brand { font-family: var(--font-display); }

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

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Lattice background -- the one bold signature element. A faint hexagonal
   line grid that very slowly drifts, suggesting automation quietly
   running in the background rather than a static decorative gradient.
   Fixed + behind everything, low opacity so it never fights with text.
   ========================================================================== */
.lattice-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(120deg, transparent 48%, rgba(124, 58, 237, 0.10) 49%, rgba(124, 58, 237, 0.10) 51%, transparent 52%),
    linear-gradient(60deg, transparent 48%, rgba(124, 58, 237, 0.10) 49%, rgba(124, 58, 237, 0.10) 51%, transparent 52%);
  background-size: 84px 146px;
  animation: lattice-drift 60s linear infinite;
  opacity: 0.55;
}
.lattice-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.22), transparent 70%);
}
@keyframes lattice-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 168px 0, -168px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lattice-bg { animation: none; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 6, 18, 0.72);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.brand { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark { color: var(--gold); }
.brand-rest { color: var(--text); }

.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--lavender); }

.header-actions { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.lang-toggle {
  font-size: 0.85rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-toggle:hover { border-color: var(--border-strong); color: var(--lavender); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 10px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dim));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.4) inset, 0 8px 24px -8px rgba(124, 58, 237, 0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.6) inset, 0 12px 28px -8px rgba(124, 58, 237, 0.8); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(167, 139, 250, 0.08); }
.btn-lg { padding: 13px 26px; font-size: 0.98rem; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: 120px 0 80px; }
.hero-inner { max-width: 760px; text-align: center; margin: 0 auto; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: rgba(255, 212, 94, 0.08);
  border: 1px solid rgba(255, 212, 94, 0.25);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-title .accent {
  background: linear-gradient(100deg, var(--purple-glow), var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle { font-size: 1.08rem; color: var(--text-dim); margin: 0 0 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   Stats
   ========================================================================== */
.stats { padding: 40px 0 100px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold);
}
.stat-label { font-size: 0.85rem; color: var(--text-dim); }

/* ==========================================================================
   Features
   ========================================================================== */
.features { padding: 60px 0 100px; }
.features .eyebrow { display: block; text-align: center; margin-inline: auto; width: fit-content; }
.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 700;
  max-width: 640px;
  margin: 14px auto 56px;
  line-height: 1.3;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature-card h3 { font-size: 1.1rem; margin: 18px 0 10px; }
.feature-card p { font-size: 0.92rem; color: var(--text-dim); margin: 0; }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dim));
  position: relative;
}
.feature-icon::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 4px;
}
.feature-icon[data-icon="rotation"]::after { border-radius: 50%; }
.feature-icon[data-icon="path"]::after { border-radius: 4px 4px 4px 0; transform: rotate(45deg); }

/* ==========================================================================
   Pricing teaser
   ========================================================================== */
.pricing-teaser { padding: 40px 0 120px; }
.pricing-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-raised), var(--bg-raised-2));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px;
}
.pricing-copy .section-title { text-align: start; margin: 14px 0 16px; }
.pricing-copy .eyebrow { display: inline-block; }
.pricing-copy p { color: var(--text-dim); margin: 0 0 28px; }

.pricing-visual { position: relative; height: 200px; }
.token-card {
  position: absolute;
  width: 160px;
  height: 100px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(140deg, rgba(124,58,237,0.35), rgba(255,212,94,0.08));
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}
.token-card-1 { top: 0; inset-inline-start: 10%; transform: rotate(-6deg); }
.token-card-2 { top: 40px; inset-inline-start: 35%; transform: rotate(3deg); z-index: 2; }
.token-card-3 { top: 10px; inset-inline-start: 58%; transform: rotate(10deg); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-brand p { color: var(--text-dim); font-size: 0.88rem; max-width: 280px; margin-top: 10px; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin: 0 0 14px; }
.footer-col a { display: block; font-size: 0.9rem; color: var(--text); margin-bottom: 10px; }
.footer-col a:hover { color: var(--lavender); }

/* ==========================================================================
   Placeholder pages
   ========================================================================== */
.placeholder-section { padding: 140px 0; text-align: center; }
.placeholder-note { color: var(--text-dim); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .main-nav { display: none; }
  .stats-grid, .feature-grid { grid-template-columns: 1fr; }
  .pricing-inner { grid-template-columns: 1fr; padding: 36px; }
  .footer-inner { grid-template-columns: 1fr; }
}
