/* ============================================================
   MindPixel.ai — core stylesheet
   Edit colors via the CSS variables in :root below.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Backgrounds */
  --bg:        #06070E;   /* near-black */
  --bg-2:      #0A0E1C;   /* deep navy */
  --bg-3:      #0E1430;   /* raised navy */

  /* Glass surfaces */
  --surface:   rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border:    rgba(255, 255, 255, 0.09);
  --border-2:  rgba(255, 255, 255, 0.16);

  /* Brand accents (mirror the logo) */
  --cyan:    #22D3EE;
  --blue:    #3B82F6;
  --violet:  #8B5CF6;
  --magenta: #EC4899;
  --red:     #EF3E47;  /* YouTube cue */

  /* Text */
  --text:   #EAF0FB;
  --muted:  #94A3C0;
  --dim:    #5E6A86;

  /* Brand gradients */
  --grad-brand: linear-gradient(110deg, var(--cyan) 0%, var(--blue) 38%, var(--violet) 70%, var(--magenta) 100%);
  --grad-soft:  linear-gradient(135deg, rgba(34,211,238,.18), rgba(139,92,246,.18) 60%, rgba(236,72,153,.16));
  --grad-text:  linear-gradient(100deg, #67E8F9, #60A5FA 45%, #C084FC 80%, #F472B6);

  /* Glow */
  --glow-blue:   0 0 40px rgba(59,130,246,.35);
  --glow-cyan:   0 0 40px rgba(34,211,238,.30);
  --glow-violet: 0 0 50px rgba(139,92,246,.30);

  /* Type */
  --font-display: "Space Grotesk", "Vazirmatn", sans-serif;
  --font-body:    "Inter", "Vazirmatn", sans-serif;
  --font-mono:    "JetBrains Mono", monospace;

  /* Spacing rhythm */
  --maxw: 1200px;
  --radius: 18px;
  --radius-sm: 12px;
  --pad-section: clamp(64px, 9vw, 130px);
  --nav-h: 74px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* Persian font + body face swap when RTL */
html[dir="rtl"] {
  --font-display: "Vazirmatn", "Space Grotesk", sans-serif;
  --font-body:    "Vazirmatn", "Inter", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Ambient background: deep navy wash + glow blobs + pixel grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 18% 8%,  rgba(34,211,238,.14), transparent 60%),
    radial-gradient(55% 45% at 85% 12%, rgba(236,72,153,.12), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(139,92,246,.16), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 30%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 30%, #000 30%, transparent 85%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: rgba(139,92,246,.45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 44px, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--pad-section); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: .55em;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--grad-brand);
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; }

.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 600;
}
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; max-width: 56ch; }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .35s var(--ease), background .3s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 8px 30px rgba(59,130,246,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 44px rgba(139,92,246,.5); }
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--cyan); transform: translateY(-2px); }
.btn-yt:hover { border-color: var(--red); }
.btn-ig:hover { border-color: var(--magenta); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,10,20,.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: min(100% - 44px, var(--maxw));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; }
.brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(59,130,246,.5)); }
.brand b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: 14px; }

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .78rem;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.lang-toggle button {
  padding: 7px 13px;
  color: var(--muted);
  transition: color .2s, background .2s;
  letter-spacing: .05em;
}
.lang-toggle button.active { color: #fff; background: var(--grad-brand); }

.hamburger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  position: relative;
}
.hamburger span,
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .3s var(--ease), opacity .2s;
}
.hamburger span::before { transform: translate(-50%, -7px); }
.hamburger span::after  { transform: translate(-50%, 5px); }
.hamburger.open span { background: transparent; }
.hamburger.open span::before { transform: translate(-50%, -50%) rotate(45deg); }
.hamburger.open span::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(40px, 8vw, 90px));
  padding-bottom: clamp(60px, 9vw, 120px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  font-weight: 600;
  margin-bottom: 22px;
}
html[dir="rtl"] .hero h1 { line-height: 1.35; }
.hero p.sub { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 38px; }
.chip {
  font-family: var(--font-mono);
  font-size: .74rem;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* Hero visual — orbiting pixel/circuit medallion behind logo */
.hero-visual {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.hero-orb {
  position: absolute;
  inset: 8%;
  border-radius: 32% 68% 70% 30% / 30% 30% 70% 70%;
  background: var(--grad-soft);
  filter: blur(26px);
  animation: morph 14s ease-in-out infinite, drift 9s ease-in-out infinite alternate;
}
@keyframes morph {
  0%,100% { border-radius: 32% 68% 70% 30% / 30% 30% 70% 70%; }
  50%     { border-radius: 64% 36% 33% 67% / 60% 50% 50% 40%; }
}
@keyframes drift { from { transform: translateY(-10px); } to { transform: translateY(12px); } }

.hero-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.12);
  animation: spin 38s linear infinite;
}
.hero-ring.inner { inset: 16%; border-style: solid; border-color: rgba(34,211,238,.18); animation-duration: 26s; animation-direction: reverse; }
.hero-ring::before {
  content: "";
  position: absolute;
  top: -5px; left: 50%;
  width: 10px; height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}
@keyframes spin { to { transform: rotate(360deg); } }

.logo-tile {
  position: relative;
  width: 66%;
  padding: 7%;
  border-radius: 30px;
  background: linear-gradient(160deg, #f6f9ff, #e7eefc);
  box-shadow: 0 24px 70px rgba(59,130,246,.45), inset 0 1px 0 rgba(255,255,255,.8);
  animation: float 6s ease-in-out infinite;
}
.logo-tile::after { /* subtle brand rim */
  content: ""; position: absolute; inset: 0; border-radius: 30px;
  padding: 1.5px; background: var(--grad-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .6;
}
.hero-logo { position: relative; width: 100%; display: block; }
@keyframes float { 0%,100% { transform: translateY(-8px); } 50% { transform: translateY(8px); } }

/* ---------- Cards (shared) ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.card::before { /* pixel-corner signature detail */
  content: "";
  position: absolute;
  top: 12px; inset-inline-end: 12px;
  width: 22px; height: 22px;
  background-image:
    radial-gradient(circle, var(--cyan) 1.4px, transparent 1.6px);
  background-size: 7px 7px;
  opacity: .35;
  transition: opacity .3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--border-2); box-shadow: 0 22px 60px rgba(0,0,0,.5), var(--glow-blue); }
.card:hover::before { opacity: .8; }

.card-body { padding: 22px; }
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139,92,246,.16);
  border: 1px solid rgba(139,92,246,.3);
  color: #C4B5FD;
  margin-bottom: 13px;
}
.card h3 { font-family: var(--font-display); font-size: 1.18rem; font-weight: 600; line-height: 1.3; }
.card p { color: var(--muted); font-size: .93rem; margin-top: 9px; }

/* Video embed frame */
.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0c1226, #131a3a);
  border-bottom: 1px solid var(--border);
}
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed .ph {
  position: absolute; inset: 0;
  display: grid; place-items: center; gap: 10px;
  color: var(--dim);
  font-family: var(--font-mono); font-size: .8rem;
}
.play-badge {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: grid; place-items: center;
  box-shadow: var(--glow-blue);
}
.play-badge svg { width: 22px; height: 22px; fill: #fff; margin-inline-start: 3px; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Learning paths ---------- */
.path-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
  position: relative;
  overflow: hidden;
}
.path-card .ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--grad-soft);
  border: 1px solid var(--border-2);
  margin-bottom: 18px;
}
.path-card .ico svg { width: 26px; height: 26px; stroke: var(--cyan); fill: none; stroke-width: 1.7; }
.path-card h3 { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; }
.path-card p { color: var(--muted); margin-top: 10px; font-size: .94rem; }
.path-card .arrow {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  font-size: .88rem; font-weight: 600; color: var(--cyan);
}
.path-card:hover { transform: translateY(-6px); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
html[dir="rtl"] .path-card .arrow svg { transform: scaleX(-1); }

/* ---------- Instagram cards ---------- */
.ig-card .embed { aspect-ratio: 4 / 5; }
.ig-card .ph .ig-mark {
  width: 50px; height: 50px; border-radius: 15px;
  background: conic-gradient(from 215deg, #F58529, #DD2A7B, #8134AF, #515BD4);
  display: grid; place-items: center;
}
.ig-card .ph .ig-mark svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2; }

/* ---------- Blog cards ---------- */
.blog-card { display: flex; flex-direction: column; }
.blog-thumb {
  aspect-ratio: 16 / 9;
  background: var(--grad-soft);
  position: relative;
  border-bottom: 1px solid var(--border);
  display: grid; place-items: center;
}
.blog-thumb .glyph { font-family: var(--font-mono); font-size: 2.2rem; color: rgba(255,255,255,.5); }
.blog-meta { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: .72rem; color: var(--dim); margin-bottom: 10px; }
.blog-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.read-more { margin-top: 16px; display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.read-more svg, .path-card .arrow svg { width: 16px; height: 16px; flex: none; }
html[dir="rtl"] .read-more svg { transform: scaleX(-1); }

/* ---------- About strip ---------- */
.about-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 50px; align-items: center; }
.about-photo {
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background: var(--grad-soft);
  border: 1px solid var(--border-2);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.about-photo img { width: 64%; opacity: .92; filter: drop-shadow(0 0 30px rgba(59,130,246,.4)); }
.about-text h2 { font-family: var(--font-display); font-size: clamp(1.7rem,3.5vw,2.6rem); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.about-text p { color: var(--muted); margin-top: 18px; font-size: 1.04rem; }
.stat-row { display: flex; gap: 36px; margin-top: 30px; flex-wrap: wrap; }
.stat b { font-family: var(--font-display); font-size: 1.8rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { display: block; color: var(--dim); font-size: .82rem; font-family: var(--font-mono); letter-spacing: .05em; }

/* ---------- Subscribe / follow ---------- */
.follow {
  text-align: center;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  padding: clamp(40px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}
.follow::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: .5;
  z-index: -1;
}
.follow h2 { font-family: var(--font-display); font-size: clamp(1.7rem,4vw,2.7rem); font-weight: 600; letter-spacing: -.02em; }
.follow p { color: var(--muted); margin: 14px auto 0; max-width: 46ch; }
.social-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.social-btn {
  width: 50px; height: 50px;
  border-radius: 14px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  display: grid; place-items: center;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s, background .25s;
}
.social-btn svg { width: 22px; height: 22px; }
.social-btn:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

/* ---------- Page header (interior pages) ---------- */
.page-head {
  padding-top: calc(var(--nav-h) + clamp(48px, 7vw, 90px));
  padding-bottom: clamp(30px, 5vw, 56px);
  text-align: center;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 600; letter-spacing: -.025em; line-height: 1.08;
}
html[dir="rtl"] .page-head h1 { line-height: 1.35; }
.page-head p { color: var(--muted); max-width: 56ch; margin: 18px auto 0; font-size: 1.08rem; }

/* Category filter pills */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
.pill {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--muted);
  font-size: .88rem; font-weight: 500;
  transition: color .2s, border-color .2s, background .2s;
}
.pill:hover { color: var(--text); border-color: var(--cyan); }
.pill.active { color: #fff; background: var(--grad-brand); border-color: transparent; }

/* Category section label inside Videos page */
.cat-block { margin-top: clamp(48px, 6vw, 80px); }
.cat-block:first-of-type { margin-top: 0; }
.cat-label { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.cat-label h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; white-space: nowrap; }
.cat-label .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-2), transparent); }
html[dir="rtl"] .cat-label .line { background: linear-gradient(270deg, var(--border-2), transparent); }

/* ---------- Start Here steps ---------- */
.steps { display: grid; gap: 18px; max-width: 820px; margin-inline: auto; }
.step {
  display: flex; gap: 22px; align-items: flex-start;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.step:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--glow-violet); }
.step .num {
  flex: none;
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  background: var(--grad-soft); border: 1px solid var(--border-2);
  color: var(--text);
}
.step h3 { font-family: var(--font-display); font-size: 1.18rem; font-weight: 600; }
.step p { color: var(--muted); margin-top: 6px; font-size: .96rem; }
.step .links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.step .links a {
  font-size: .85rem; font-weight: 600; color: var(--cyan);
  border: 1px solid var(--border-2); padding: 7px 14px; border-radius: 999px;
  transition: border-color .2s, background .2s;
}
.step .links a:hover { border-color: var(--cyan); background: var(--surface-2); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 920px; margin-inline: auto; }
.contact-card {
  display: flex; align-items: center; gap: 18px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.contact-card .ico {
  flex: none; width: 50px; height: 50px; border-radius: 14px;
  background: var(--grad-soft); border: 1px solid var(--border-2);
  display: grid; place-items: center;
}
.contact-card .ico svg { width: 24px; height: 24px; }
.contact-card .label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.contact-card .val { font-weight: 600; margin-top: 3px; word-break: break-all; }

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(60px, 9vw, 120px);
  border-top: 1px solid var(--border);
  background: rgba(6,7,14,.6);
  backdrop-filter: blur(12px);
  padding-block: 52px 30px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer .brand { margin-bottom: 16px; }
.footer p.tag { color: var(--muted); max-width: 38ch; font-size: .95rem; }
.footer h4 { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 11px; }
.footer ul a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  color: var(--dim); font-size: .84rem; font-family: var(--font-mono);
}

/* ---------- Scroll to top ---------- */
.to-top {
  position: fixed;
  inset-inline-end: 24px;
  bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(59,130,246,.45);
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: opacity .3s, transform .3s, visibility .3s;
  z-index: 90;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.4; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile nav drawer ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(6,7,14,.96);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 600;
  color: var(--muted);
  padding: 10px 20px;
  transition: color .2s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--text); }
.mobile-menu .lang-toggle { margin-top: 24px; font-size: .9rem; }

/* ---------- Hide-by-language ---------- */
html[lang="en"] [data-lang="fa"],
html[lang="fa"] [data-lang="en"] { display: none !important; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { max-width: 380px; margin-inline: auto; order: -1; }
  .about-wrap { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 360px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .nav-right .lang-toggle { display: none; } /* lang lives in drawer on mobile */
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .stat-row { gap: 24px; }
}
