/* ══ Navbar ══ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .65rem 1.5rem;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: var(--border-w) solid var(--border);
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-mark { display: flex; }
.brand-text { display: flex; flex-direction: column; font-size: 1.25rem; line-height: 1.1; }
.brand-text small { font-family: var(--font-body); font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.brand-text.big { font-size: 1.5rem; }
.nav-links { display: flex; gap: 1.4rem; }
.nav-link {
  font-size: .92rem; font-weight: 600; color: var(--muted);
  padding: .3rem 0; border-bottom: 3px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--ink); border-color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.menu-btn { display: none; }

/* ══ Drawer ══ */
.drawer {
  position: sticky; top: 68px; z-index: 99;
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1rem 1.5rem 1.3rem;
  background: var(--surface); border-bottom: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-sm); animation: fadeUp .2s var(--ease);
}
.drawer-link { font-family: var(--font-display); font-weight: 700; padding: .5rem 0; border-bottom: 2px dashed var(--border); }
.drawer-cta { margin-top: .9rem; }

/* ══ Hero ══ */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; padding-top: 3.5rem; }
.hero-copy h1 { margin-bottom: .9rem; }
.hero-copy > p { font-size: 1.06rem; max-width: 54ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 1.6rem; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats b { font-family: var(--font-display); font-size: 1.55rem; }
.hero-stats span { font-size: .8rem; color: var(--muted); }

/* ══ Hero artwork stack ══ */
.hero-art { position: relative; min-height: 380px; display: grid; place-items: center; }
.art-stack { position: relative; width: min(100%, 400px); aspect-ratio: 4 / 5; }
.mini-book {
  position: absolute; inset: 0;
  background: var(--surface); border: var(--border-w) solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .35s var(--ease);
}
.mini-book .mini-art { display: grid; place-items: center; padding: 1rem; height: 62%; background: var(--bg-soft); border-bottom: var(--border-w) solid var(--border); }
.mini-book .mini-art svg { width: 82%; height: 100%; }
.mini-book .mini-text { padding: .9rem 1.1rem; }
.mini-book .mini-text b { font-family: var(--font-display); font-size: 1.05rem; display: block; }
.mini-book .mini-text span { font-size: .78rem; color: var(--muted); }
.art-stack .mini-book:nth-child(1) { transform: rotate(-9deg) translate(-14%, 5%); }
.art-stack .mini-book:nth-child(2) { transform: rotate(-2deg) translate(-3%, 2%); }
.art-stack .mini-book:nth-child(3) { transform: rotate(5deg) translate(9%, -1%); box-shadow: 10px 10px 0 var(--ink); }
.art-stack:hover .mini-book:nth-child(1) { transform: rotate(-12deg) translate(-19%, 7%); }
.art-stack:hover .mini-book:nth-child(3) { transform: rotate(8deg) translate(13%, -4%); }
.float-tag {
  position: absolute; z-index: 5; font-size: .76rem; font-weight: 700;
  background: var(--yellow); color: #14120F; border: var(--border-w) solid var(--border);
  border-radius: 999px; padding: .25rem .8rem; box-shadow: var(--shadow-sm);
  animation: wiggle 4.5s ease-in-out infinite;
}
.float-tag.t1 { top: 6%; inset-inline-start: -4%; }
.float-tag.t2 { bottom: 10%; inset-inline-end: -5%; background: var(--violet); color: #FFF; animation-delay: 1.2s; }

/* ══ Feature cards ══ */
.feature { padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; }
.feature .f-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border: var(--border-w) solid var(--border); border-radius: 14px;
  background: var(--bg-soft); box-shadow: var(--shadow-sm); margin-bottom: .3rem;
}
.feature .f-icon i { width: 24px; height: 24px; }
.feature h3 { font-size: 1.05rem; }
.feature p { font-size: .9rem; }
.feature.c-red .f-icon { background: var(--red); color: #FFF; }
.feature.c-yellow .f-icon { background: var(--yellow); color: #14120F; }
.feature.c-violet .f-icon { background: var(--violet); color: #FFF; }
.feature.c-teal .f-icon { background: var(--teal); color: #FFF; }
.feature.c-sky .f-icon { background: var(--sky); color: #FFF; }
.feature.c-leaf .f-icon { background: var(--leaf); color: #FFF; }

/* ══ Tabs ══ */
.tabs { display: inline-flex; gap: .3rem; padding: .3rem; background: var(--surface); border: var(--border-w) solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.tab {
  font-family: var(--font-display); font-size: .88rem; font-weight: 700; cursor: pointer;
  padding: .4rem 1.05rem; border-radius: 999px; border: 2px solid transparent;
  background: transparent; color: var(--muted); min-height: 38px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.tab:hover { color: var(--ink); background: var(--bg-soft); }
.tab.active { background: var(--ink); color: var(--bg); }
.save-tag { font-size: .68rem; background: var(--leaf); color: #FFF; border-radius: 999px; padding: .05rem .45rem; margin-inline-start: .3rem; }

/* ══ Gallery cards ══ */
.tpl-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tpl-cover { position: relative; aspect-ratio: 3 / 4; background: var(--bg-soft); display: grid; place-items: center; border-bottom: var(--border-w) solid var(--border); }
.tpl-cover svg { width: 78%; height: 78%; }
.tpl-cover .tpl-tag {
  position: absolute; top: .6rem; inset-inline-start: .6rem; font-size: .68rem; font-weight: 700;
  background: var(--ink); color: var(--bg); padding: .15rem .55rem; border-radius: 999px;
  border: 2px solid var(--border);
}
.tpl-body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.tpl-body b { font-family: var(--font-display); font-size: .98rem; }
.tpl-body p { font-size: .82rem; flex: 1; }
.tpl-meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.tpl-meta span { font-size: .7rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 2px solid var(--border); border-radius: 999px; padding: .08rem .5rem; }

/* ══ Pricing ══ */
.price-card { padding: 1.5rem; display: flex; flex-direction: column; gap: .9rem; position: relative; }
.price-card.featured { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.price-card.featured p, .price-card.featured li { color: color-mix(in srgb, var(--bg) 82%, transparent); }
.price-card.featured .pill { background: var(--accent); color: var(--on-accent); border-color: var(--border); }
.price-card .plan-name { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.price-value { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; }
.price-value small { font-size: .8rem; font-family: var(--font-body); color: var(--muted); }
.price-card.featured .price-value small { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.plan-list { list-style: none; display: flex; flex-direction: column; gap: .45rem; font-size: .88rem; }
.plan-list li { display: flex; align-items: flex-start; gap: .45rem; }
.plan-list i { width: 17px; height: 17px; margin-top: .3rem; flex-shrink: 0; color: var(--success); }
.price-card.featured .plan-list i { color: var(--accent); }
.fineprint { display: flex; align-items: center; justify-content: center; gap: .45rem; font-size: .82rem; margin-top: 1.4rem; text-align: center; }
.fineprint i { width: 16px; height: 16px; }

/* ══ FAQ ══ */
.faq { display: flex; flex-direction: column; gap: .8rem; max-width: 820px; margin: 0 auto; }
.faq-item { background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem; cursor: pointer; background: transparent; border: none;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--ink); text-align: start;
}
.faq-q i { width: 20px; height: 20px; flex-shrink: 0; transition: transform .22s var(--ease); }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s var(--ease); }
.faq-a p { padding: 0 1.15rem 1.1rem; font-size: .91rem; }
.faq-item.open .faq-a { max-height: 340px; }

/* ══ CTA band ══ */
.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 2.2rem;
  background: linear-gradient(120deg, var(--yellow) 0%, var(--accent) 45%, var(--red) 100%);
  color: #14120F; border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.cta-band h2 { color: #14120F; }
.cta-band p { color: #2A2016; font-weight: 500; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.cta-band .btn-ghost { background: #FFFBEB; }

/* ══ Footer ══ */
.footer { border-top: var(--border-w) solid var(--border); background: var(--surface); margin-top: 2rem; }
.footer-cols { max-width: 1200px; margin: 0 auto; padding: 3rem 1.5rem 2rem; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-brand p { font-size: .88rem; margin-top: .7rem; max-width: 40ch; }
.footer-col { display: flex; flex-direction: column; gap: .5rem; }
.footer-col h4 { margin-bottom: .35rem; }
.footer-col a { font-size: .88rem; color: var(--muted); transition: color .16s var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-bar {
  border-top: 2px dashed var(--border); max-width: 1200px; margin: 0 auto;
  padding: 1rem 1.5rem 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem;
  align-items: center; justify-content: space-between; font-size: .8rem; color: var(--muted);
}
.footer-bar .built strong { color: var(--ink); }

/* ══ Responsive ══ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 320px; order: -1; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-cta { display: none; }
  .section { padding: 3.2rem 1.1rem; }
  .navbar { padding: .6rem 1.1rem; }
  .cta-band { padding: 1.6rem; }
}
@media (max-width: 520px) {
  .footer-cols { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

/* ══ Fallback: إن تعذّر تحميل مكتبة الأيقونات لا تظهر مربّعات فارغة ══ */
.no-icons i[data-lucide] { display: none; }
.no-icons .hint i[data-lucide], .no-icons .palette-head .label i[data-lucide] { display: none; }
