/* ===== متغیرهای پایه و تم‌ها ===== */
:root {
  --bg: #0e1118;
  --surface: #161a23;
  --card: #1b202c;
  --cream: #fff7fd;
  --muted: #b9adb6;
  --ink: #1f1a21;
  --line: #1f1a21;
  --accent: #ff70a6;
  --h-font: 'Vazirmatn', sans-serif;
  --b-font: 'Vazirmatn', sans-serif;
  --fs: 1;
  --sh-sm: 2px 2px 0 var(--line);
  --sh-md: 4px 4px 0 var(--line);
  --sh-lg: 6px 6px 0 var(--line);
}
/* پنج تم رنگی */
[data-section="composition"] { --accent: #ffd166; }
[data-section="mixing"]      { --accent: #70d6bc; }
[data-section="chords"]      { --accent: #9d8df1; }
[data-section="sheets"]      { --accent: #ff70a6; }
[data-section="store"]       { --accent: #ff9770; }

/* ===== پایه ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,.08) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  color: var(--cream);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--h-font); line-height: 1.4; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 500;
  font-size: 22px; line-height: 1; vertical-align: middle;
}
.skip { position: absolute; right: -9999px; top: 0; }
.skip:focus { right: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }

main { display: block; padding-bottom: 120px; max-width: 1280px; margin: 0 auto; padding-inline: 16px; }

/* ===== هدر ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22,26,35,.95);
  backdrop-filter: blur(8px);
  border-bottom: 2.5px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.hdr-inner {
  max-width: 1280px; margin: 0 auto; height: 72px;
  padding: 0 16px; display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo {
  width: 46px; height: 46px; display: grid; place-items: center;
  background: #ffd166; color: var(--ink);
  border: 2.5px solid var(--line); border-radius: 14px;
  box-shadow: var(--sh-sm); transform: rotate(-3deg); font-size: 26px;
}
.brand-name { display: flex; align-items: center; gap: 6px; font-family: var(--h-font); font-weight: 900; font-size: 18px; color: #fff; }
.pro { font-size: 10px; background: #ff70a6; color: #fff; padding: 2px 7px; border-radius: 99px; border: 1.5px solid var(--line); font-family: 'Vazirmatn'; }
.brand small { display: block; color: #ff70a6; font-weight: 700; font-size: 11px; }

.main-nav { display: none; gap: 4px; margin-inline-start: auto; }
.main-nav a { padding: 8px 12px; border-radius: 10px; color: #dcd3da; font-weight: 700; font-size: 14px; border: 2px solid transparent; }
.main-nav a:hover { background: #21222e; }
.main-nav a.active { background: #70d6bc; color: var(--ink); border-color: var(--line); box-shadow: var(--sh-sm); }

.hdr-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.search { display: none; position: relative; }
.search input {
  width: 250px; height: 42px; padding: 0 44px 0 14px;
  border-radius: 12px; border: 2.5px solid var(--line);
  background: var(--cream); color: var(--ink);
  font: inherit; font-size: 14px; box-shadow: var(--sh-sm);
}
.search button {
  position: absolute; inset-inline-start: 4px; top: 4px;
  width: 34px; height: 34px; border: 0; border-radius: 9px;
  background: #ffd166; cursor: pointer; display: grid; place-items: center;
}
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: #1b202c; color: #fff; cursor: pointer;
  border: 2.5px solid var(--line); border-radius: 12px; box-shadow: var(--sh-sm);
  transition: transform .12s, box-shadow .12s;
}
.icon-btn:active { transform: translate(2px,2px); box-shadow: none; }

/* ===== نوار پایین موبایل ===== */
.bottom-nav {
  position: fixed; bottom: 12px; inset-inline: 12px; z-index: 60;
  height: 64px; display: flex; align-items: center; gap: 4px; padding: 6px;
  background: rgba(20,21,31,.96);
  border: 2.5px solid var(--line); border-radius: 18px; box-shadow: var(--sh-lg);
}
.bottom-nav a {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  border-radius: 12px; font-size: 11px; font-weight: 800; color: #cfc6cf;
}
.bottom-nav a.active { background: #ffd166; color: var(--ink); border: 2px solid var(--line); box-shadow: var(--sh-sm); }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .search { display: block; }
  .bottom-nav { display: none; }
  main { padding-bottom: 60px; }
}
@media (min-width: 1200px) { .search { display: block; } }

/* ===== هیرو ===== */
.hero {
  position: relative; margin-top: 16px; overflow: hidden;
  background-color: #ffd166;
  background-image: radial-gradient(rgba(31,26,33,.18) 2.5px, transparent 2.5px);
  background-size: 22px 22px;
  color: var(--ink);
  border: 3px solid var(--line); border-radius: 22px; box-shadow: var(--sh-lg);
  padding: 28px 22px;
}
.pill {
  display: inline-block; background: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 12px; border: 2px solid var(--line); border-radius: 99px; box-shadow: var(--sh-sm);
}
.hero h1 { font-size: clamp(26px, 4.6vw, 50px); font-weight: 900; margin: 14px 0; }
.hero h1 mark {
  display: inline-block; background: #ff70a6; color: #fff;
  padding: 2px 12px; margin-top: 8px; border: 2.5px solid var(--line);
  border-radius: 10px; box-shadow: var(--sh-md); transform: rotate(-1deg);
}
.hero p { font-size: 15px; font-weight: 500; max-width: 620px; margin: 0 0 20px; }
.hero-grid { display: grid; gap: 24px; align-items: center; position: relative; z-index: 1; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.2fr 1fr; } .hero { padding: 48px; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; background: #fff; color: var(--ink);
  border: 3px solid var(--line); border-radius: 14px; box-shadow: var(--sh-md);
  font-family: var(--h-font); font-weight: 800; font-size: 15px; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--line); }
.btn-pink { background: #ff70a6; color: #fff; }

.eq-card {
  background: var(--card); color: var(--cream);
  border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--sh-lg);
  padding: 18px; transform: rotate(1deg);
}
.eq {
  display: flex; align-items: flex-end; gap: 6px; height: 120px;
  background: #11141c; padding: 12px; border-radius: 12px;
  border: 2px solid var(--line); margin-bottom: 14px;
}
.eq span {
  flex: 1; height: var(--h); background: var(--c);
  border: 2px solid var(--line); border-bottom: 0; border-radius: 5px 5px 0 0;
  animation: eq 1.6s ease-in-out infinite alternate; animation-delay: var(--d);
}
@keyframes eq { to { height: calc(var(--h) * .45); } }
.now { display: flex; align-items: center; gap: 12px; background: #242b3b; padding: 12px; border-radius: 12px; border: 2px solid var(--line); }
.now-ico { width: 46px; height: 46px; display: grid; place-items: center; background: #ffd166; color: var(--ink); border-radius: 10px; border: 2px solid var(--line); font-size: 26px; }
.now strong { display: block; font-size: 15px; }
.now small { color: #70d6bc; font-size: 12px; }

/* ===== دسترسی سریع ===== */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.quick a {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  background: var(--card); border: 2.5px solid var(--line); border-radius: 16px;
  box-shadow: var(--sh-sm); font-weight: 800; font-size: 14px;
}
.q-ico {
  width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--c); color: var(--ink); border: 2px solid var(--line); border-radius: 10px;
}
@media (min-width: 900px) { .quick { grid-template-columns: repeat(4, 1fr); } }

/* ===== بخش‌ها ===== */
.section {
  margin-top: 48px; scroll-margin-top: 96px;
  font-family: var(--b-font); font-size: calc(16px * var(--fs));
}
.sec-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 3px solid var(--accent);
}
.sec-title { display: flex; align-items: center; gap: 12px; }
.sec-ico {
  width: 50px; height: 50px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent); color: var(--ink);
  border: 3px solid var(--line); border-radius: 14px; box-shadow: var(--sh-md);
  transform: rotate(-3deg); font-size: 26px;
}
.sec-title h2 { font-family: var(--h-font); font-size: clamp(20px, 2.6vw, 30px); font-weight: 900; color: #fff; }
.sec-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.more {
  padding: 8px 14px; background: var(--card); color: #fff;
  border: 2.5px solid var(--line); border-radius: 12px; box-shadow: var(--sh-sm);
  font-weight: 800; font-size: 14px;
}
.more:hover { background: var(--accent); color: var(--ink); }

/* ===== کارت‌ها ===== */
.cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(262px, 80%);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 2px 16px;
}
@media (min-width: 900px) {
  .cards { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; }
}
.card {
  scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 3px solid var(--line); border-radius: 20px;
  box-shadow: var(--sh-md); padding: 14px; transition: transform .15s;
}
@media (hover: hover) { .card:hover { transform: translateY(-4px); } }
.card-vis {
  position: relative; height: 150px; display: grid; place-items: center;
  background-color: var(--accent);
  background-image: radial-gradient(rgba(31,26,33,.22) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  border: 2.5px solid var(--line); border-radius: 14px;
}
.card-icon { font-size: 56px; color: var(--ink); opacity: .9; }
.card-tag {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--cream); color: var(--ink); font-size: 11px; font-weight: 900;
  padding: 3px 9px; border: 2px solid var(--line); border-radius: 8px; box-shadow: var(--sh-sm);
}
.card-meta {
  position: absolute; bottom: 10px; inset-inline-end: 10px;
  background: #11141c; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 6px;
}
.card-title { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.6; }
.card-excerpt { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.card-btn {
  margin-top: auto; display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 10px; background: var(--accent); color: var(--ink);
  border: 2.5px solid var(--line); border-radius: 14px; box-shadow: var(--sh-sm);
  font-family: var(--h-font); font-weight: 900;
}

/* ===== بنر ===== */
.banner {
  margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: #70d6bc; color: var(--ink);
  border: 3px solid var(--line); border-radius: 22px; box-shadow: var(--sh-lg); padding: 26px;
}
.banner h3 { font-size: clamp(20px, 2.5vw, 28px); font-weight: 900; }
.banner p { margin: 4px 0 0; }

/* ===== فوتر ===== */
.site-footer { margin-top: 64px; background: #131720; border-top: 3px solid var(--line); padding: 40px 0 130px; }
.site-footer .inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.ann { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ann { grid-template-columns: repeat(3, 1fr); } .site-footer { padding-bottom: 40px; } }
.ann-card {
  display: grid; gap: 8px; padding: 18px;
  background: var(--c); color: var(--ink);
  border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--sh-md);
}
.ann-card small { font-weight: 800; font-size: 12px; }
.ann-card h4 { font-size: 17px; font-weight: 900; }
.ann-card p { margin: 0; font-size: 14px; }
.foot-bottom {
  margin-top: 28px; padding-top: 18px; border-top: 2px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 13px;
}
.foot-bottom nav { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-bottom a:hover { color: #fff; }
.foot-brand { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; }

/* ===== پنل تنظیمات فونت ===== */
.fab {
  position: fixed; inset-inline-start: 14px; bottom: 92px; z-index: 70;
  width: 52px; height: 52px; cursor: pointer;
  background: #ffd166; color: var(--ink); font-family: 'Lalezar', sans-serif; font-size: 18px; font-weight: 900;
  border: 3px solid var(--line); border-radius: 16px; box-shadow: var(--sh-md);
}
@media (min-width: 900px) { .fab { bottom: 20px; } }
.panel {
  display: none; position: fixed; inset-inline-start: 14px; bottom: 156px; z-index: 70;
  width: min(330px, calc(100vw - 28px));
  background: var(--card); color: var(--cream);
  border: 3px solid var(--line); border-radius: 18px; box-shadow: var(--sh-lg); padding: 16px;
}
@media (min-width: 900px) { .panel { bottom: 84px; } }
.panel.open { display: block; }
.panel h3 { font-size: 16px; margin-bottom: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tabs button, .panel-actions button {
  padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  background: #242b3b; color: #fff; border: 2px solid var(--line); border-radius: 10px;
}
.tabs button[aria-pressed="true"] { background: #ffd166; color: var(--ink); }
.field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.field select {
  font: inherit; padding: 8px; border-radius: 10px;
  border: 2px solid var(--line); background: var(--cream); color: var(--ink);
}
.field input[type="range"] { width: 100%; accent-color: #ffd166; }
.sample { padding: 10px; border-radius: 10px; background: #11141c; margin-bottom: 12px; font-size: 15px; }
.panel-actions { display: flex; justify-content: space-between; gap: 8px; }
.panel-actions button[data-close] { background: #ff70a6; color: #fff; }

/* ===== دسترسی و کاهش حرکت ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
