:root {
  --line: #262626;
  --grey: #8c8c8c;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: "Vazirmatn", system-ui, sans-serif;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
body.is-locked {
  overflow: hidden;
}
a {
  color: inherit;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* دانه‌های ریز روی کل صفحه */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- اسپلش ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: grid;
  place-items: center;
  transition: opacity 0.6s var(--ease);
}
#splash.out {
  opacity: 0;
}
#splash .box {
  width: min(78vw, 520px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
#skip {
  position: absolute;
  inset-block-end: 28px;
  inset-inline: 0;
  margin: auto;
  width: max-content;
  background: none;
  border: 1px solid #333;
  color: #aaa;
  border-radius: 99px;
  padding: 2px 18px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
@property --h {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
@property --p {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

:root {
  --fx: 0.9s;
}

.box img,
.hero-gif img {
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  transition:
    opacity var(--fx) ease,
    transform var(--fx) var(--ease),
    filter var(--fx) ease,
    clip-path var(--fx) var(--ease),
    --h var(--fx) ease,
    --p var(--fx) ease;
}
.box img.in,
.hero-gif img.in {
  opacity: 1;
}

/* blur: فلش نور و بلور و بزرگ شدن */
[data-fx="blur"] img {
  transform: scale(1.18);
  filter: blur(22px) brightness(2.2);
}
[data-fx="blur"] img.in {
  transform: none;
  filter: none;
}

/* zoom: گیف به سمت دوربین پرت میشه */
[data-fx="zoom"] img {
  transform: scale(3.2);
  filter: blur(14px);
}
[data-fx="zoom"] img.in {
  transform: none;
  filter: none;
}

/* iris: بسته شدن مثل دریچه دوربین به سمت مرکز */
[data-fx="iris"] img {
  opacity: 1;
  clip-path: circle(0% at 50% 50%);
}
[data-fx="iris"] img.in {
  clip-path: circle(75% at 50% 50%);
}

/* curtain: جمع شدن از پایین به بالا مثل پرده */
[data-fx="curtain"] img {
  opacity: 1;
  clip-path: inset(0 0 100% 0);
}
[data-fx="curtain"] img.in {
  clip-path: inset(0 0 0 0);
}

/* split: بسته شدن از دو طرف به سمت خط وسط، مثل دو در */
[data-fx="split"] img {
  opacity: 1;
  clip-path: inset(0 50% 0 50%);
}
[data-fx="split"] img.in {
  clip-path: inset(0 0 0 0);
}

/* blinds: بسته شدن مثل کرکره افقی */
[data-fx="blinds"] img {
  opacity: 1;
  --h: 0px;
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0, #000 var(--h), transparent var(--h), transparent 36px);
  mask-image: repeating-linear-gradient(to bottom, #000 0, #000 var(--h), transparent var(--h), transparent 36px);
}
[data-fx="blinds"] img.in {
  --h: 36px;
}

/* wipe: پاک شدن نرم از راست به چپ */
[data-fx="wipe"] img {
  opacity: 1;
  --p: 0%;
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--p) - 18%), transparent var(--p));
  mask-image: linear-gradient(to right, #000 calc(var(--p) - 18%), transparent var(--p));
}
[data-fx="wipe"] img.in {
  --p: 118%;
}

/* ---------- ورود المان‌ها از پایین ---------- */
.rise {
  opacity: 0;
  transform: translateY(90px);
  pointer-events: none;
  transition:
    opacity 0.9s var(--ease),
    transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.ready .rise {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------- نوار بالا ---------- */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  color: #fff;
  mix-blend-mode: difference;
}
.nav a {
  text-decoration: none;
}
.brand {
  font-weight: 800;
  font-size: 1.15rem;
}
.nav nav {
  display: flex;
  gap: 22px;
}
@media (max-width: 560px) {
  .nav nav a:nth-child(n + 3) {
    display: none;
  }
}

/* ---------- هیرو ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 96px 20px 64px;
}
.hero-gif {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 13vh 9vw;
}
.hero-gif img {
  max-height: 70svh;
}
.hero-ui {
  position: relative;
  width: min(1100px, 100%);
  display: grid;
  gap: 14px;
}
.hero-ui p {
  margin: 0;
}
.lead {
  color: var(--grey);
  font-size: 1rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 12vw, 7rem);
  font-weight: 800;
  line-height: 1.15;
}
.sub {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  max-width: 32em;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;

  padding: 11px 24px;
  font-size: 0.95rem;
  border: 1px solid #fff;
  border-radius: 99px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background 0.25s,
    color 0.25s;
}
.btn.solid {
  background: #fff;
  color: #000;
}
.btn.solid:hover {
  background: #000;
  color: #fff;
}
.btn.ghost:hover {
  background: #fff;
  color: #000;
}
.btn.dark {
  background: #000;
  color: #fff;
  border-color: #000;
}
.btn.dark:hover {
  background: #fff;
  color: #000;
}
.light .btn.ghost {
  border-color: #000;
}
.light .btn.ghost:hover {
  background: #000;
  color: #fff;
}

/* ---------- نوار متحرک ---------- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  direction: ltr;
  border-block: 1px solid var(--line);
}
.marquee-track {
  display: inline-flex;
  animation: slide 30s linear infinite;
}
.marquee-track {
  align-items: center;
  padding-block: 22px;
}
.marquee img {
  height: clamp(40px, 6vw, 64px);
  width: auto;
  border-radius: 14px;
  margin-inline: clamp(20px, 4vw, 40px);
  filter: grayscale(1);
  opacity: 0.75;
  transition:
    filter 0.4s,
    opacity 0.3s;
}
.marquee img:hover {
  filter: none;
  opacity: 1;
}
@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- سکشن‌ها ---------- */
.sec {
  padding: clamp(72px, 12vw, 160px) 20px;
}
.wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
}
.light {
  background: #fff;
  color: #000;
}
h2 {
  margin: 0 0 0.5em;
  font-size: clamp(1.7rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.25;
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.empty {
  color: var(--grey);
  margin: 0;
}

.about-grid {
  display: grid;
  gap: 40px;
}
.about-grid p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 2;
  max-width: 36em;
  margin: 0;
}
.facts {
  border-top: 1px solid #000;
  align-self: end;
}
.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #000;
}
@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

/* ---------- گالری ---------- */
.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: 8px 28px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar {
  display: none;
}
.work-card {
  flex: none;
  width: min(78vw, 340px);
  scroll-snap-align: start;
  text-decoration: none;
  display: block;
}
.work-card .pic {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.1);
  transition:
    filter 0.5s,
    transform 0.8s var(--ease);
}
.work-card:hover img,
.work-card:focus-visible img {
  filter: none;
  transform: scale(1.05);
}
.work-card h3 {
  margin: 14px 0 2px;
  font-size: 1.2rem;
}
.work-card p {
  margin: 0;
  color: var(--grey);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- پیش‌نمایش کانال ---------- */
.chan-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
.chan-text {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  max-width: 28em;
  margin: 0 0 24px;
}
@media (min-width: 860px) {
  .chan-grid {
    grid-template-columns: 1fr 360px;
  }
}
.phone {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  padding: 10px;
  background: #000;
  color: #fff;
  border-radius: 36px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
}
.phone-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.phone-bar small {
  color: var(--grey);
}
.dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.chat {
  display: grid;
  gap: 8px;
  align-content: end;
  min-height: 320px;
  padding: 14px 8px;
}
.msg {
  background: #1a1a1a;
  border-radius: 16px;
  border-end-start-radius: 4px;
  padding: 6px;
  max-width: 92%;
  width: fit-content;
}
.msg img {
  display: block;
  width: 100%;
  border-radius: 12px;
  filter: grayscale(1);
}
.msg p {
  margin: 0;
  padding: 4px 8px;
  font-size: 0.92rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msg time {
  display: block;
  text-align: end;
  font-size: 0.72rem;
  color: var(--grey);
  padding: 0 8px 2px;
}

/* ---------- خدمات ---------- */
.rows {
  border-top: 1px solid var(--line);
}
.row {
  display: grid;
  gap: 6px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition:
    background 0.3s,
    color 0.3s,
    padding 0.4s var(--ease);
}
.row h3 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 800;
  line-height: 1.4;
}
.row p {
  margin: 0;
  color: var(--grey);
  transition: color 0.3s;
}
.row:hover {
  background: #fff;
  color: #000;
  padding-inline: 20px;
}
.row:hover p {
  color: #444;
}
@media (min-width: 800px) {
  .row {
    grid-template-columns: 1fr 1.4fr;
    align-items: center;
  }
}

/* ---------- فوتر ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 20px;
  text-align: center;
  color: var(--grey);
  font-size: 0.9rem;
}
footer p {
  margin: 0;
}
a.row {
  color: inherit;
  text-decoration: none;
}
.light .rows {
  border-top-color: #000;
}
.light .row {
  border-bottom-color: #000;
}
.light .row p {
  color: #555;
}
.light .row:hover {
  background: #000;
  color: #fff;
}
.light .row:hover p {
  color: #bbb;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rise {
    transition: none;
  }
  .marquee-track {
    animation: none;
  }
}
