:root {
  --bg: #07080c;
  --surface: #10121a;
  --surface-2: #151823;
  --text: #f5f7fb;
  --muted: #9aa1b3;
  --accent: #ffffff;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.14);
  --radius: 24px;
  --shell: 1240px;
  --header-h: 78px;
  --font-latin: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-persian: "Vazirmatn", Tahoma, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-persian, "Vazirmatn"), var(--font-latin, "Inter"), ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif; line-height: 1.7; overflow-x: hidden; }
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
code, .ltr { direction: ltr; unicode-bidi: isolate; text-align: left; }
img, video { max-width: 100%; }

.site-noise { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035; background-image: radial-gradient(rgba(255,255,255,.7) .5px, transparent .6px); background-size: 5px 5px; mix-blend-mode: overlay; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.section-pad { padding: 96px 0; }
.section-dark { background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); border-block: 1px solid rgba(255,255,255,.04); }

.site-header { position: sticky; top: 0; z-index: 90; height: var(--header-h); background: rgba(7,8,12,.68); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.nav-shell { height: 100%; display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 24px; height: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }
.brand-mark i { display: block; border-radius: 5px; background: var(--accent); box-shadow: 0 0 18px rgba(255,255,255,.25); }
.brand-mark i:nth-child(2) { opacity: .45; transform: translateY(3px); }
.brand-mark i:nth-child(3) { opacity: .68; transform: translateX(3px); }
.brand-mark i:nth-child(4) { opacity: .25; }
.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}
.site-nav { display: flex; align-items: center; gap: 8px; margin-inline: auto; }
.site-nav a { padding: 9px 13px; border-radius: 10px; color: var(--muted); font-size: 14px; transition: .2s ease; }
.site-nav a:hover, .site-nav a.active { color: var(--text); background: rgba(255,255,255,.05); }
.site-nav a.active { box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
.nav-cta { display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px; border-radius: 12px; background: var(--accent); color: #050505; font-size: 13px; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,255,255,.16); }
.menu-toggle { display: none; margin-inline-start: auto; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); border-radius: 12px; cursor: pointer; }
.menu-toggle span { display: block; width: 18px; height: 1px; margin: 4px auto; background: var(--text); transition: .2s ease; }

.hero { min-height: calc(100vh - var(--header-h)); display: grid; align-items: center; position: relative; }
.hero-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 70px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.status-dot, .live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.hero h1, .page-hero h1 { margin: 20px 0; font-size: clamp(48px, 6.1vw, 92px); line-height: .98; letter-spacing: -.06em; font-weight: 850; }
.hero h1 em { display: inline-block; margin-top: 10px; font-size: clamp(18px, 2vw, 26px); font-style: normal; font-weight: 520; color: var(--muted); letter-spacing: -.03em; }
.hero-copy > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 48px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--line-strong); border-radius: 13px; font-size: 13px; font-weight: 750; transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.35); }
.button-primary { background: var(--accent); border-color: var(--accent); color: #050505; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 14px 34px rgba(255,255,255,.08); }
.button-primary:hover { box-shadow: 0 16px 36px rgba(255,255,255,.16); }
.button-ghost { background: rgba(255,255,255,.02); }
.hero-metrics { display: flex; gap: 34px; margin-top: 50px; padding-top: 18px; border-top: 1px solid var(--line); }
.hero-metrics div { display: grid; gap: 1px; }
.hero-metrics strong { font-size: 12px; color: var(--accent); letter-spacing: .08em; }
.hero-metrics span { font-size: 10px; color: var(--muted); letter-spacing: .15em; }

.hero-stage { position: relative; min-height: 560px; border: 1px solid var(--line); border-radius: 34px; overflow: hidden; background: radial-gradient(circle at 50% 46%, rgba(255,255,255,.08), transparent 28%), linear-gradient(150deg, #0d1118, #07080c 60%); box-shadow: inset 0 0 90px rgba(255,255,255,.02); }
.stage-grid { position: absolute; inset: 0; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent); }
.stage-orbit { position: absolute; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; transform: rotate(-17deg); }
.orbit-a { width: 80%; height: 47%; left: 10%; top: 25%; }
.orbit-b { width: 50%; height: 72%; left: 25%; top: 13%; transform: rotate(32deg); opacity: .38; }
.stage-word { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); font-size: clamp(34px, 5vw, 70px); font-weight: 900; line-height: .9; letter-spacing: .06em; color: #ffffff; text-shadow: 0 0 30px rgba(255,255,255,.18); white-space: nowrap; }
.stage-word span { color: var(--accent); }
.stage-caption { position: absolute; left: 28px; right: 28px; bottom: 24px; display: flex; align-items: center; justify-content: space-between; color: #6f7586; font-size: 10px; letter-spacing: .16em; }
.stage-caption i { flex: 1; height: 1px; margin: 0 16px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); }
.stage-people { position: absolute; inset: auto 0 0; display: flex; justify-content: center; gap: clamp(8px, 1.2vw, 16px); height: 34%; align-items: flex-end; opacity: .9; }
.stage-people b { width: clamp(11px, 1.4vw, 18px); height: clamp(42px, 10vw, 104px); border-radius: 50% 50% 6px 6px; background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.04)); filter: blur(.1px); opacity: .35; box-shadow: 0 0 28px rgba(255,255,255,.12); }
.stage-people b:nth-child(2n) { height: 78%; opacity: .16; }
.stage-people b:nth-child(3n) { height: 58%; opacity: .24; }

.section-heading { display: grid; grid-template-columns: 1fr 400px; gap: 50px; align-items: end; margin-bottom: 44px; }
.section-heading h2 { margin: 10px 0 0; font-size: clamp(30px, 4vw, 56px); line-height: 1.08; letter-spacing: -.05em; }
.section-heading h2 span { color: var(--accent); }
.section-heading > p { margin: 0; color: var(--muted); font-size: 14px; }

.pixel-module { border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: #05070a; }
.pixel-toolbar, .pixel-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.015); }
.pixel-footer { border-top: 1px solid var(--line); border-bottom: 0; color: #747b8d; font-size: 10px; letter-spacing: .12em; }
.pixel-footer b { color: var(--text); font-weight: 700; }
.pixel-mode-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.mode-button { border: 0; background: transparent; color: var(--muted); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 11px; letter-spacing: .12em; }
.mode-button.active { background: var(--accent); color: #070707; font-weight: 800; }
.pixel-state { color: #6e7583; font-size: 10px; letter-spacing: .13em; display: inline-flex; gap: 8px; align-items: center; }
.pixel-stage { position: relative; min-height: 520px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at center, rgba(255,255,255,.07), transparent 31%), #05070a; }
.pixel-stage::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: rgba(255,255,255,.04); filter: blur(40px); }
.pixel-canvas { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(var(--matrix-cols), var(--pixel-size)); grid-template-rows: repeat(var(--matrix-rows), var(--pixel-size)); gap: var(--pixel-gap); padding: 26px; border-radius: 18px; direction: ltr; place-items: center; max-width: calc(100% - 28px); overflow: visible; }
.pixel-cell { width: var(--pixel-size); height: var(--pixel-size); border-radius: 3px; background: rgba(255,255,255,.22); opacity: 0; transform: scale(.45); transition: opacity .4s ease, transform .45s cubic-bezier(.2,.8,.2,1), filter .45s ease; transition-delay: var(--delay); will-change: opacity, transform; box-shadow: 0 0 0 transparent; }
.pixel-cell.entering { opacity: .95; transform: scale(1); background: #ffffff; box-shadow: 0 0 10px rgba(255,255,255,.5), 0 0 26px rgba(255,255,255,.18); }
.pixel-cell.off { opacity: .10; transform: scale(.65); background: rgba(255,255,255,.07); box-shadow: none; }
.pixel-cell.leaving { opacity: 0; transform: scale(.35); }
.pixel-cell.hot { opacity: 1; transform: scale(1.5); box-shadow: 0 0 16px rgba(255,255,255,.85), 0 0 34px rgba(255,255,255,.35); }
.pixel-crowd { position: absolute; inset: 15% 4% 12%; z-index: 1; opacity: .33; overflow: hidden; }
.pixel-crowd i { position: absolute; width: 2px; height: 2px; left: var(--x); top: var(--y); background: rgba(255,255,255,.45); border-radius: 50%; box-shadow: 0 0 8px rgba(255,255,255,.1); animation: crowdPulse 2.9s ease-in-out infinite; animation-delay: var(--delay); }
.pixel-vignette { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(circle, transparent 44%, rgba(0,0,0,.34) 100%); }

.video-section { background: #090b10; }
.video-shell { border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: var(--surface); }
.video-viewport { position: relative; aspect-ratio: 16/9; background: #030405; display: grid; place-items: center; }
.video-viewport video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; color: var(--muted); padding: 20px; }
.video-empty[hidden] { display: none; }
.empty-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 4px; border: 1px solid var(--line); border-radius: 16px; color: var(--accent); }
.video-empty strong { color: var(--text); }
.video-empty small { max-width: 400px; }
.video-info { display: flex; justify-content: space-between; align-items: center; gap: 26px; padding: 24px; }
.video-index { color: var(--accent); font-size: 10px; letter-spacing: .12em; }
.video-info h3 { margin: 4px 0; font-size: 24px; letter-spacing: -.03em; }
.video-info p { margin: 0; color: var(--muted); font-size: 13px; }
.video-controls { display: flex; gap: 9px; flex-shrink: 0; }
.circle-button { width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255,255,255,.02); cursor: pointer; transition: .2s ease; }
.circle-button:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(255,255,255,.35); }
.circle-button-primary { background: var(--accent); border-color: var(--accent); color: #050505; }
.circle-button:disabled { opacity: .3; cursor: not-allowed; }

.applications { position: relative; }
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.app-card { min-height: 290px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; transition: background .25s ease, transform .25s ease; }
.app-card:hover { background: rgba(255,255,255,.025); transform: translateY(-4px); }
.app-number { position: absolute; top: 27px; right: 27px; font-size: 10px; color: #626978; letter-spacing: .14em; }
.app-icon { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid rgba(255,255,255,.22); border-radius: 13px; color: var(--accent); margin-bottom: 64px; font-size: 20px; box-shadow: 0 0 0 4px rgba(255,255,255,.025); }
.app-card h3 { margin: 0 0 8px; font-size: 20px; }
.app-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; }

.page-hero { padding-top: 110px; }
.page-hero-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 80px; align-items: center; }
.page-hero h1 { font-size: clamp(50px, 7vw, 92px); }
.page-hero h1 .accent, .narrow-hero .accent { color: var(--accent); }
.page-hero p { max-width: 600px; color: var(--muted); font-size: 17px; }
.about-diagram { min-height: 470px; position: relative; border: 1px solid var(--line); border-radius: 30px; background: radial-gradient(circle at center, rgba(255,255,255,.09), transparent 28%), #090c11; overflow: hidden; }
.diagram-ring { position: absolute; inset: 50%; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; transform: translate(-50%, -50%); }
.diagram-ring.r2 { width: 250px; height: 250px; opacity: .55; }
.diagram-ring.r3 { width: 120px; height: 120px; opacity: .75; }
.diag-core { position: absolute; inset: 50%; transform: translate(-50%, -50%); width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; background: var(--accent); color: #050505; font-size: 24px; font-weight: 900; box-shadow: 0 0 40px rgba(255,255,255,.18); }
.diag-label { position: absolute; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(7,8,12,.8); color: #8d95a6; font-size: 9px; letter-spacing: .16em; }
.l1 { top: 17%; left: 15%; }.l2 { top: 68%; right: 13%; }.l3 { bottom: 13%; left: 18%; }
.story-grid { display: grid; grid-template-columns: .3fr 1fr; gap: 70px; }
.story-copy h2 { max-width: 860px; margin: 0; font-size: clamp(30px, 4.6vw, 60px); line-height: 1.1; letter-spacing: -.05em; }
.story-copy p { max-width: 850px; color: var(--muted); font-size: 16px; margin: 28px 0 0; }
.flow-grid { display: grid; grid-template-columns: 1fr 70px 1fr 70px 1fr; align-items: center; }
.flow-step { padding: 24px; border: 1px solid var(--line); min-height: 260px; border-radius: 20px; background: rgba(255,255,255,.02); }
.flow-num { color: var(--accent); font-size: 10px; letter-spacing: .15em; }
.flow-symbol { color: var(--accent); font-size: 30px; margin: 38px 0 15px; }
.flow-step h3 { margin: 0 0 7px; font-size: 20px; }
.flow-step p { color: var(--muted); font-size: 13px; margin: 0; }
.flow-line { height: 2px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.815), transparent); }
.use-case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.use-case { min-height: 210px; padding: 22px; background: #0b0d12; transition: background .2s ease; }
.use-case:hover { background: #0e1117; }
.use-case > span { color: var(--accent); font-size: 10px; letter-spacing: .16em; }
.use-case h3 { margin: 46px 0 9px; font-size: 19px; }
.use-case p { color: var(--muted); font-size: 13px; margin: 0; }

.narrow-hero { max-width: 900px; margin-inline: auto; text-align: center; }
.narrow-hero p { max-width: 690px; margin-inline: auto; }
.download-section { min-height: 55vh; }
.download-note { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(255,255,255,.035); }
.note-mark { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #070707; font-weight: 900; }
.download-note p { margin: 0; color: #c0c6d2; font-size: 13px; }
.download-list { display: grid; gap: 10px; }
.download-card { display: grid; grid-template-columns: 58px 1fr auto; gap: 18px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.018); transition: .2s ease; }
.download-card:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.025); }
.download-index { color: var(--accent); font-size: 11px; }
.download-type { color: #707789; font-size: 9px; letter-spacing: .14em; }
.download-main h2 { margin: 2px 0 2px; font-size: 18px; }
.download-main p { margin: 0; color: var(--muted); font-size: 12px; }
.empty-download { padding: 40px; border: 1px dashed var(--line); border-radius: 18px; display: grid; gap: 4px; text-align: center; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); padding: 30px 0 40px; background: #06070a; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: end; }
.site-footer p { margin: 10px 0 0; color: #6e7582; font-size: 12px; }
.footer-links { display: flex; gap: 16px; color: #858c9d; font-size: 12px; }
.footer-links a:hover { color: var(--text); }
.footer-code { justify-self: end; color: #656c7b; font-size: 9px; letter-spacing: .16em; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .75s ease, transform .75s cubic-bezier(.2,.8,.2,1); }
.reveal-delay { transition-delay: .1s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes crowdPulse { 0%, 100% { opacity: .14; transform: scale(.8); } 50% { opacity: .85; transform: scale(1.7); } }

@media (min-width: 1100px) {
  .pixel-canvas { --pixel-size: clamp(6px, .65vw, 10px); --pixel-gap: clamp(2px, .26vw, 4px); }
}
@media (min-width: 769px) and (max-width: 1099px) {
  .pixel-canvas { --pixel-size: clamp(5px, .82vw, 8px); --pixel-gap: clamp(1px, .2vw, 3px); }
}
@media (max-width: 768px) {
  :root { --header-h: 68px; }
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .section-pad { padding: 72px 0; }
  .nav-shell { position: relative; }
  .menu-toggle { display: block; }
  .nav-cta { display: none; }
  .site-nav { position: absolute; top: calc(100% + 8px); right: 0; left: 0; padding: 10px; display: grid; gap: 4px; background: rgba(10,11,15,.98); border: 1px solid var(--line); border-radius: 18px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s ease; }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 13px; }
  .hero { min-height: auto; padding-top: 58px; }
  .hero-grid, .page-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-stage { min-height: 430px; }
  .hero-actions .button { flex: 1 1 180px; }
  .hero-metrics { gap: 20px; margin-top: 36px; }
  .section-heading { grid-template-columns: 1fr; gap: 12px; margin-bottom: 28px; }
  .section-heading > p { max-width: 630px; }
  .pixel-stage { min-height: 370px; }
  .pixel-canvas { --pixel-size: clamp(3.7px, 1.3vw, 6px); --pixel-gap: clamp(1px, .33vw, 2px); padding: 14px; }
  .pixel-cell { border-radius: 2px; }
  .pixel-footer { flex-wrap: wrap; }
  .video-info { flex-direction: column; align-items: flex-start; }
  .video-controls { align-self: stretch; justify-content: flex-end; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding-top: 72px; }
  .about-diagram { min-height: 380px; }
  .story-grid { grid-template-columns: 1fr; gap: 20px; }
  .flow-grid { grid-template-columns: 1fr; gap: 10px; }
  .flow-line { height: 1px; width: 25%; justify-self: center; }
  .use-case-grid { grid-template-columns: repeat(2, 1fr); }
  .download-card { grid-template-columns: 44px 1fr; }
  .download-card .button { grid-column: 2; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
  .footer-code { justify-self: start; }
}
@media (max-width: 420px) {
  .shell { width: calc(100% - 20px); }
  .hero h1, .page-hero h1 { font-size: clamp(42px, 14vw, 58px); }
  .hero-copy > p, .page-hero p { font-size: 14px; }
  .hero-stage { min-height: 360px; border-radius: 24px; }
  .stage-caption { left: 16px; right: 16px; font-size: 8px; }
  .stage-word { font-size: 29px; }
  .pixel-stage { min-height: 300px; }
  .pixel-canvas { --pixel-size: clamp(2.8px, 1.15vw, 4.2px); --pixel-gap: clamp(1px, .28vw, 1.4px); padding: 8px; max-width: calc(100% - 10px); }
  .pixel-toolbar { padding: 12px; }
  .pixel-footer { gap: 8px; font-size: 8px; }
  .app-grid, .use-case-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 240px; }
  .about-diagram { min-height: 320px; }
  .diagram-ring { width: 260px; height: 260px; }
  .diagram-ring.r2 { width: 190px; height: 190px; }
  .diagram-ring.r3 { width: 100px; height: 100px; }
  .download-card { padding: 14px; }
  .download-card .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .text-live-preview::before, .logo-live-preview::before { opacity:.24; }
}


/* ===== Pixel Lab refresh ===== */
:root {
  --font-latin: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-persian: "Vazirmatn", Tahoma, Arial, sans-serif;
}
body {
  font-family: var(--font-persian);
  font-feature-settings: "kern" 1, "liga" 1;
}
.ltr, code, input.ltr { font-family: var(--font-latin), var(--font-persian); }
h1, h2, h3, h4, p, a, button, label, input { font-family: var(--font-persian), var(--font-latin); }
.brand, .nav-cta, .eyebrow, .mode-button, .pixel-state, .workspace-kicker, .workspace-note, .editor-clear, .editor-index, .preview-card-head span { font-family: var(--font-latin), var(--font-persian); }
.pixel-lab { border: 1px solid var(--line); border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.01)); box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.pixel-lab-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.018); }
.pixel-workspace { display:grid; grid-template-columns:minmax(0,1.22fr) minmax(330px,.78fr); direction:ltr; }
.pixel-workspace[hidden] { display:none; }
.pixel-results-panel, .pixel-editors-panel { direction:rtl; padding:26px; }
.pixel-results-panel { border-inline-end:1px solid var(--line); background:radial-gradient(circle at 50% 42%, rgba(255,255,255,.055), transparent 42%), #07090c; }
.pixel-editors-panel { background:rgba(255,255,255,.012); }
.workspace-label-row { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.workspace-label-row h3 { margin:3px 0 0; font-size:19px; letter-spacing:-.02em; }
.workspace-kicker { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.14em; }
.workspace-note { color:#767e8e; font-size:11px; margin-top:4px; }
.preview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.preview-card, .pixel-editor-card { min-width:0; border:1px solid rgba(255,255,255,.075); border-radius:20px; background:rgba(2,4,6,.65); overflow:hidden; }
.preview-card-head, .editor-card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.06); }
.preview-card-head span, .editor-index { color:#798294; font-size:10px; font-weight:800; letter-spacing:.12em; }
.preview-card-head strong { font-size:13px; color:#f2f2f2; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.preview-canvas { display:block; width:100%; aspect-ratio:1; image-rendering:pixelated; background:radial-gradient(circle at center, rgba(255,255,255,.05), transparent 60%), #05070a; }
.editor-stack { display:grid; gap:14px; }
.logo-editor-tabs { display:inline-flex; gap:4px; padding:4px; margin-bottom:14px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.02); }
.logo-tab { border:0; background:transparent; color:var(--muted); padding:8px 14px; border-radius:8px; cursor:pointer; font-family:var(--font-latin), var(--font-persian); font-size:11px; font-weight:700; letter-spacing:.04em; transition:.2s ease; }
.logo-tab.active { background:var(--accent); color:#070707; font-weight:800; }
.logo-editor-panel[hidden] { display:none; }
.logo-editor-panel .pixel-editor-card { width:100%; }
.text-editor-card { display:grid; grid-template-columns:34px 1fr; gap:12px; align-items:center; padding:14px; border:1px solid rgba(255,255,255,.075); border-radius:18px; background:rgba(2,4,6,.52); }
.editor-copy { display:grid; gap:2px; text-align:right; min-width:0; }
.editor-copy b { font-size:13px; }
.editor-copy small, .editor-card-head small { color:#778092; font-size:10px; }
.pixel-text-input { grid-column:1 / -1; width:100%; min-height:52px; border:1px solid rgba(255,255,255,.08); outline:none; border-radius:13px; padding:10px 13px; background:#0c1016; color:#f4f7f1; font-weight:600; font-size:16px; transition:border-color .2s ease, box-shadow .2s ease; }
.pixel-text-input:focus { border-color:rgba(255,255,255,.45); box-shadow:0 0 0 4px rgba(255,255,255,.08); }
.preview-button { white-space:nowrap; padding:11px 15px; }
.editor-hint { margin:14px 1px 0; color:#747d8d; font-size:11px; line-height:1.8; }
.editor-card-head { padding-bottom:11px; }
.editor-card-head > div { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.editor-card-head b { font-size:13px; }
.editor-card-head small { width:100%; margin-inline-start:43px; margin-top:-4px; }
.editor-clear { border:0; background:transparent; color:#8a93a4; cursor:pointer; font-size:10px; font-weight:700; letter-spacing:.04em; }
.editor-clear:hover { color:#fff; }
.pixel-editor-canvas { display:block; width:100%; aspect-ratio:1; cursor:crosshair; touch-action:none; image-rendering:pixelated; background:#05070a; }
.pixel-editor-canvas.is-painting { cursor:cell; }
@media (max-width: 980px) {
  .pixel-workspace { grid-template-columns:1fr; }
  .pixel-results-panel { border-inline-end:0; border-bottom:1px solid var(--line); }
}
@media (max-width: 640px) {
  .pixel-lab-head, .workspace-label-row { align-items:stretch; flex-direction:column; }
  .pixel-state { justify-content:flex-start; }
  .pixel-results-panel, .pixel-editors-panel { padding:18px; }
  .logo-editor-tabs { width:100%; }
  .logo-tab { flex:1; }
  .preview-grid { grid-template-columns:1fr; }
  .pixel-mode-switch { width:100%; }
  .mode-button { flex:1; }
}

/* Text pixel preview refinement */
.text-live-preview-wrap, .logo-live-preview-wrap { display:block; }
.text-live-preview-card, .logo-live-preview-card { width:100%; }
.text-live-preview, .logo-live-preview {
  position:relative;
  isolation:isolate;
  background:#05070a;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}
.text-live-preview::before, .logo-live-preview::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.34;
  background-image:
    radial-gradient(circle at 10% 16%, rgba(255,255,255,.16) 0 1px, transparent 1.7px),
    radial-gradient(circle at 23% 71%, rgba(255,255,255,.10) 0 1px, transparent 1.8px),
    radial-gradient(circle at 37% 28%, rgba(255,255,255,.12) 0 1px, transparent 1.7px),
    radial-gradient(circle at 53% 82%, rgba(255,255,255,.08) 0 1px, transparent 1.7px),
    radial-gradient(circle at 67% 19%, rgba(255,255,255,.13) 0 1px, transparent 1.8px),
    radial-gradient(circle at 79% 62%, rgba(255,255,255,.10) 0 1px, transparent 1.8px),
    radial-gradient(circle at 91% 33%, rgba(255,255,255,.14) 0 1px, transparent 1.8px),
    radial-gradient(circle at 86% 88%, rgba(255,255,255,.08) 0 1px, transparent 1.7px);
  animation:previewFlashField 4.2s ease-in-out infinite;
}
.text-live-preview::after, .logo-live-preview::after {
  content:"";
  position:absolute;
  inset:18%;
  z-index:0;
  pointer-events:none;
  background:radial-gradient(circle at center, rgba(255,255,255,.018), transparent 68%);
}
.text-live-preview { min-height:320px; aspect-ratio:2.15 / 1; display:block; padding:28px; direction:ltr; overflow:hidden; }
.logo-live-preview { min-height:420px; aspect-ratio:1.35 / 1; display:block; padding:26px; overflow:hidden; direction:ltr; }
.pixel-preview-canvas { position:relative; z-index:1; display:block; width:100%; height:100%; object-fit:contain; image-rendering:pixelated; opacity:0; transform:scale(.985); transition:opacity .32s ease, transform .32s ease; }
.pixel-preview-canvas.is-ready { opacity:1; transform:scale(1); }
.pixel-preview-canvas.is-transitioning { opacity:0; transform:scale(.985); }

@keyframes previewFlashField {
  0%, 100% { opacity:.18; transform:scale(1); }
  18% { opacity:.34; }
  34% { opacity:.22; }
  56% { opacity:.42; }
  72% { opacity:.20; }
}

@media (min-width:981px) {
  .text-live-preview { --pixel-size:clamp(2.8px,.38vw,5px); --pixel-gap:clamp(1px,.09vw,1.8px); }
  .logo-live-preview { --pixel-size:clamp(4px,.52vw,7px); --pixel-gap:clamp(1px,.11vw,1.8px); }
}
@media (max-width:980px) {
  .text-live-preview { --pixel-size:clamp(2.8px,.7vw,4.5px); --pixel-gap:clamp(1px,.16vw,1.5px); min-height:260px; }
  .logo-live-preview { --pixel-size:clamp(3.2px,.95vw,5px); --pixel-gap:1px; min-height:300px; }
}
@media (max-width:640px) {
  .text-live-preview { --pixel-size:clamp(2.2px,1vw,3.8px); --pixel-gap:1px; min-height:220px; padding:16px; }
  .logo-live-preview { --pixel-size:clamp(2.8px,1.5vw,4px); --pixel-gap:1px; min-height:230px; padding:16px; }
}

/* ===== Responsive text preview tab fix ===== */
.pixel-lab,
.pixel-lab-head,
.pixel-workspace,
.pixel-results-panel,
.pixel-editors-panel,
.text-live-preview-wrap,
.text-live-preview-card {
  min-width: 0;
  max-width: 100%;
}

.pixel-mode-switch {
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
}

.mode-button {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-live-preview-card {
  display: flex;
  flex-direction: column;
}

.text-live-preview {
  width: 100%;
  height: clamp(220px, 28vw, 360px);
  min-height: 0;
  max-height: 360px;
  aspect-ratio: auto;
  padding: clamp(10px, 2vw, 28px);
  display: block;
  overflow: hidden;
}

.text-live-preview .pixel-preview-canvas {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 980px) {
  .text-live-preview {
    height: clamp(230px, 52vw, 340px);
    max-height: 340px;
  }
}

@media (max-width: 640px) {
  .pixel-mode-switch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }

  .mode-button {
    width: 100%;
    padding-inline: 8px;
    letter-spacing: .04em;
  }

  .text-live-preview {
    height: clamp(200px, 62vw, 290px);
    max-height: 290px;
    padding: 10px;
  }
}

@media (max-width: 420px) {
  .pixel-lab {
    border-radius: 22px;
  }

  .pixel-lab-head {
    padding: 12px;
    gap: 10px;
  }

  .pixel-results-panel,
  .pixel-editors-panel {
    padding: 14px;
  }

  .text-live-preview {
    height: clamp(190px, 66vw, 250px);
    padding: 8px;
  }

  .preview-card-head {
    padding: 10px 12px;
  }

  .preview-card-head strong {
    max-width: 62%;
  }
}

/* Prevent framing around the actual logo bitmap; editor grid remains the editing aid. */
.logo-live-preview,
.logo-live-preview .pixel-preview-canvas,
.pixel-editor-canvas {
  border: 0;
  outline: 0;
  box-shadow: none;
}

/* ===== Supplied logo as the editable 50×50 source of truth ===== */
.logo-live-preview {
  padding: 0;
  min-height: 0;
  aspect-ratio: 1;
  background: #05070a;
}
.logo-live-preview::before,
.logo-live-preview::after {
  display: none;
}
.logo-live-preview .pixel-preview-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}


/* ===== Final supplied-logo behavior: editable 50×50 source ===== */
.logo-live-preview-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible;
}
.logo-live-preview-card .preview-card-head {
  border-bottom: 0;
}
.logo-live-preview {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  min-height: 0 !important;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #05070a;
}
.logo-live-preview .pixel-preview-canvas {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
