/* فونت ایران‌یکان (fontiran.com)؛ وزن‌های موجود: نازک، سبک، معمولی، متوسط. وزن‌های پررنگ‌تر از «متوسط» از همان فایل متوسط استفاده می‌کنند */
@font-face {
  font-family: "IRANYekan";
  src: url("fonts/iranyekan-thin.woff2") format("woff2");
  font-weight: 100 200; font-display: swap;
}
@font-face {
  font-family: "IRANYekan";
  src: url("fonts/iranyekan-light.woff2") format("woff2");
  font-weight: 300; font-display: swap;
}
@font-face {
  font-family: "IRANYekan";
  src: url("fonts/iranyekan-regular.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "IRANYekan";
  src: url("fonts/iranyekan-medium.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}
/* تم تیره (پیش‌فرض) و روشن با رنگ اصلی بنفش؛ برای عوض کردن رنگ اصلی فقط --accent را تغییر بده.
   تم روشن: یا کاربر با دکمه انتخاب کرده (data-theme=light)، یا سیستمش روشن است و خودش چیزی انتخاب نکرده */
:root {
  --bg: #09090B;
  --surface: #111018;
  --surface-2: #17151F;
  --ink: #FAFAFA;
  --muted: #A1A1AA;
  --line: rgba(124, 124, 124, 0.2);
  --accent: #7C3BED;
  --accent-soft: rgba(124, 59, 237, 0.16);
  --accent-ink: #C4B5FD;
  --live: #4ADE80;
  --soon: #FBBF24;
  --nav-bg: rgba(9, 9, 11, 0.72);
  --hover: rgba(255, 255, 255, 0.05);
  --tint: rgba(255, 255, 255, 0.04);
  --grid-line: rgba(255, 255, 255, 0.045);
  --field-bg: rgba(9, 9, 11, 0.6);
  --body-ink: #D4D4D8;
  --glow: rgba(124, 59, 237, 0.55);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F7F6FB;
  --surface: #FFFFFF;
  --surface-2: #F3F0FA;
  --ink: #18181B;
  --muted: #62626D;
  --line: rgba(24, 24, 27, 0.1);
  --accent-soft: rgba(124, 59, 237, 0.09);
  --accent-ink: #6D28D9;
  --live: #15803D;
  --soon: #B45309;
  --nav-bg: rgba(255, 255, 255, 0.75);
  --hover: rgba(24, 24, 27, 0.05);
  --tint: rgba(24, 24, 27, 0.03);
  --grid-line: rgba(24, 24, 27, 0.06);
  --field-bg: #FFFFFF;
  --body-ink: #3F3F46;
  --glow: rgba(124, 59, 237, 0.22);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F6FB; --surface: #FFFFFF; --surface-2: #F3F0FA; --ink: #18181B; --muted: #62626D;
    --line: rgba(24, 24, 27, 0.1); --accent-soft: rgba(124, 59, 237, 0.09); --accent-ink: #6D28D9;
    --live: #15803D; --soon: #B45309; --nav-bg: rgba(255, 255, 255, 0.75); --hover: rgba(24, 24, 27, 0.05);
    --tint: rgba(24, 24, 27, 0.03); --grid-line: rgba(24, 24, 27, 0.06); --field-bg: #FFFFFF;
    --body-ink: #3F3F46; --glow: rgba(124, 59, 237, 0.22); color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.8 "IRANYekan", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* نوار بالا: شناور، با حاشیه نازک و پس‌زمینه مات */
.top {
  position: sticky; top: 12px; z-index: 10;
  max-width: 1120px; margin: 12px auto 0; padding: 0 24px;
}
.top-in {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 60px; padding: 0 12px 0 16px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; direction: ltr; }
.brand i { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-style: normal; font-size: 15px; color: #fff; }
.links { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.links a { color: var(--muted); padding: 6px 12px; border-radius: 8px; }
.links a:hover { color: var(--ink); background: var(--hover); }
.links .btn { color: #fff; padding: 8px 16px; }
.theme {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted);
  transition: color .2s, background .2s;
}
.theme:hover { color: var(--ink); background: var(--hover); }
.theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* در تم تیره آیکون خورشید (رفتن به روشن)، در تم روشن آیکون ماه */
.theme .moon, [data-theme="light"] .theme .sun { display: none; }
[data-theme="light"] .theme .moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme .sun { display: none; }
  :root:not([data-theme="dark"]) .theme .moon { display: block; }
}

/* دکمه‌ها */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-weight: 500; font-size: 15px;
  padding: 11px 26px; border-radius: 8px; border: 1px solid transparent;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--hover); filter: none; }
.btn.off { background: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: default; filter: none; }

/* برچسب کوچک بالای عنوان‌ها */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid rgba(124, 59, 237, 0.35);
  padding: 4px 12px; border-radius: 999px;
}

/* بخش اول با پس‌زمینه شطرنجی محو */
.hero { position: relative; text-align: center; padding-block: 120px 110px; }
.hero::before {
  content: ""; position: absolute; inset: -80px 0 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero h1 {
  font-size: clamp(42px, 8vw, 84px); font-weight: 800; line-height: 1.15;
  margin: 22px 0 18px; letter-spacing: -0.02em;
  animation: unblur 1.1s ease-out both;
}
.hero p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 36px; }
.hero .cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
@keyframes unblur { from { filter: blur(14px); opacity: 0; } to { filter: blur(0); opacity: 1; } }

/* سربرگ بخش‌ها */
.head { text-align: center; margin-bottom: 44px; }
.head h2 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; line-height: 1.3; margin: 16px 0 10px; }
.head p { color: var(--muted); margin: 0 auto; max-width: 520px; }
section.block { padding-block: 40px 100px; }

/* کارت پروژه‌ها */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 360px)); justify-content: center; gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c, var(--accent)), transparent);
  opacity: 0; transition: opacity .2s;
}
.card:hover { border-color: rgba(124, 59, 237, 0.5); transform: translateY(-2px); }
.card:hover::after { opacity: 1; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.tile {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--c, var(--accent)); color: #fff;
  box-shadow: 0 0 0 4px var(--tint), 0 8px 24px -8px var(--c, var(--accent));
}
.tile img { width: 28px; height: 28px; object-fit: contain; }
.tile b { font-size: 22px; font-weight: 800; }
.card h3 { font-size: 21px; font-weight: 700; margin: 0 0 6px; }
.card .line { color: var(--muted); font-size: 15px; margin: 0 0 20px; flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.card-foot .go { color: var(--accent-ink); font-weight: 500; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; padding: 3px 10px; border-radius: 999px; background: var(--tint); border: 1px solid var(--line); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status.live { color: var(--live); }
.status.soon { color: var(--soon); }

/* کادر پایانی با نور بنفش */
.glow {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 72px 24px 80px; margin-bottom: 80px;
  background: radial-gradient(ellipse 60% 70% at 50% 120%, var(--glow), transparent 70%), var(--surface);
}
.glow h2 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; margin: 0 0 12px; line-height: 1.3; }
.glow p { color: var(--muted); max-width: 480px; margin: 0 auto 30px; }

/* ارتباط با من */
#contact { padding-bottom: 80px; scroll-margin-top: 90px; }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.way {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s;
}
.way:hover { border-color: rgba(124, 59, 237, 0.5); }
.way-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.way-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.way small { display: block; color: var(--muted); font-size: 13px; }
.way b { font-weight: 600; font-size: 15px; }
.msg-form { text-align: right; padding: 28px; margin-bottom: 0; display: grid; gap: 14px; }
.msg-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.msg-form input, .msg-form textarea {
  font: inherit; color: var(--ink); background: var(--field-bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 14px; width: 100%; resize: vertical;
}
.msg-form input:focus, .msg-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.msg-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.msg-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.msg-foot .btn { margin-right: auto; border: 0; cursor: pointer; font-family: inherit; }
.msg-foot .btn:disabled { opacity: .6; cursor: default; }
.msg-status { margin: 0; font-size: 14px; color: var(--muted); }
.msg-status.ok { color: var(--live); }
.msg-status.err { color: #F87171; }
.foot-links { display: flex; gap: 16px; }

/* صفحه پروژه */
.back {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 28px; padding: 8px 14px 8px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-size: 14px; text-decoration: none; transition: color .2s, border-color .2s;
}
.back:hover { color: var(--ink); border-color: var(--accent); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.p-hero { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding-block: 40px 40px; position: relative; }
.p-hero::before {
  content: ""; position: absolute; inset: -80px 0 0; z-index: -1;
  background: radial-gradient(ellipse 50% 60% at 15% 30%, var(--accent-soft), transparent 70%);
}
.p-hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; line-height: 1.2; margin: 18px 0 12px; letter-spacing: -0.02em; animation: unblur .9s ease-out both; }
.p-hero .lead { color: var(--muted); font-size: 18px; margin: 0 0 30px; max-width: 52ch; }
.p-hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.addr { color: var(--muted); font-size: 14px; }
.big-tile { width: 140px; height: 140px; border-radius: 32px; }
.big-tile img { width: 76px; height: 76px; }
.big-tile b { font-size: 64px; }

.shot {
  border: 1px solid var(--line); border-radius: 16px; padding: 10px;
  background: var(--surface); margin-bottom: 16px;
}
.shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
/* عکس مخصوص هر تم */
.shot .only-light, [data-theme="light"] .shot .only-dark { display: none; }
[data-theme="light"] .shot .only-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .shot .only-dark { display: none; }
  :root:not([data-theme="dark"]) .shot .only-light { display: block; }
}

.details { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding-bottom: 100px; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 28px; }
.panel h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.panel p { margin: 0 0 14px; color: var(--body-ink); max-width: 62ch; }
.panel ul { list-style: none; margin: 0 0 24px; padding: 0; }
.panel li { position: relative; padding-right: 26px; margin-bottom: 10px; color: var(--body-ink); }
.panel li::before {
  content: ""; position: absolute; right: 0; top: 8px; width: 14px; height: 14px; border-radius: 4px;
  background: var(--accent-soft); border: 1px solid rgba(124, 59, 237, 0.5);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 13px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; color: var(--muted); font-size: 14px; }
.foot a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .wrap, .top { padding: 0 16px; }
  .top-in { height: 54px; }
  .links a:not(.btn) { display: none; }
  .hero { padding-block: 72px; }
  .hero p { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .links .btn { padding: 6px 12px; font-size: 13px; }
  .p-hero { grid-template-columns: 1fr; padding-top: 40px; gap: 20px; }
  .big-tile { order: -1; width: 88px; height: 88px; border-radius: 22px; }
  .big-tile img { width: 48px; height: 48px; }
  .big-tile b { font-size: 40px; }
  .details { grid-template-columns: 1fr; padding-bottom: 64px; }
  .panel { padding: 22px; }
  .glow { padding: 52px 20px 60px; }
  .msg-form { padding: 20px; }
  .msg-form .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1, .p-hero h1 { animation: none; }
  .card { transition: none; }
}
