/* Ganjineh — ganjinehparsi.com
   Four colours from the app icon: indigo, madder, ivory, gold. */
:root {
  --indigo: #17244a;
  --indigo-deep: #0d1630;
  --indigo-soft: #24345f;
  --madder: #9e2328;
  --madder-deep: #6e151b;
  --ivory: #f7f0e1;
  --ivory-card: #fffaf0;
  --ink: #1b1a2c;
  --ink-soft: #5e5869;
  --gold: #c99a3e;
  --gold-light: #e6c47a;
  --gold-leaf: linear-gradient(135deg, #f6e3ab 0%, #d8ae5a 45%, #9c7330 75%, #eed08a 100%);
  --rule: #e6d8b8;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(107, 85, 48, .12);
  --font: "Vazirmatn", "Inter", system-ui, -apple-system, sans-serif;
  --display-fa: "Noto Nastaliq Urdu", serif;
  --display-en: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--font); line-height: 1.75; overflow-x: hidden; }
a { color: var(--madder); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.35; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

[lang="en"] .only-fa, [lang="fa"] .only-en { display: none !important; }
[lang="en"] body { line-height: 1.6; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

/* ---------- Carpet motifs ---------- */
.carpet {
  background-color: var(--indigo-deep);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(230, 196, 122, .55) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(230, 196, 122, .3) 0 2px, transparent 3px),
    repeating-linear-gradient(45deg, rgba(201, 154, 62, .10) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-45deg, rgba(201, 154, 62, .10) 0 1px, transparent 1px 34px);
  background-size: 48px 48px, 48px 48px, auto, auto;
  background-position: 0 0, 24px 24px, 0 0, 0 0;
}
.carpet-madder {
  background-color: var(--madder);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(247, 240, 225, .8) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 50%, rgba(247, 240, 225, .8) 0 3px, transparent 4px),
    repeating-linear-gradient(45deg, rgba(217, 164, 65, .28) 0 1.5px, transparent 1.5px 34px),
    repeating-linear-gradient(-45deg, rgba(217, 164, 65, .28) 0 1.5px, transparent 1.5px 34px);
  background-size: 48px 48px, 48px 48px, auto, auto;
  background-position: 0 0, 24px 24px, 0 0, 0 0;
}
.border-band {
  height: 16px;
  background: radial-gradient(circle, var(--ivory) 0 2.5px, transparent 3.5px) 0 50% / 20px 16px repeat-x, var(--madder);
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}
.ornament {
  width: 180px; height: 14px; margin: 0 auto 30px;
  background:
    radial-gradient(circle, var(--gold) 0 5px, transparent 6px) 50% 50% / 14px 14px no-repeat,
    linear-gradient(90deg, transparent, var(--gold) 40%, transparent 41% 59%, var(--gold) 60%, transparent) 50% 50% / 100% 1.5px no-repeat;
}

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 22, 48, .92);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(201, 154, 62, .35);
}
.top-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.top a { color: var(--ivory); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(230, 196, 122, .5); }
.brand .fa { font-family: var(--display-fa); font-size: 19px; line-height: 1; padding-top: 6px; }
.brand .en { font-family: var(--display-en); letter-spacing: .14em; font-size: 15px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 6px 12px; border-radius: 999px; font-size: 15px; color: rgba(247, 240, 225, .85); }
.nav a:hover { background: rgba(247, 240, 225, .08); color: var(--ivory); }
.lang-toggle {
  border: 1px solid rgba(230, 196, 122, .6); border-radius: 999px; padding: 4px 14px; font-size: 14px;
  color: var(--gold-light) !important; flex-shrink: 0;
}
.menu-btn { display: none; background: none; border: 0; color: var(--ivory); font-size: 24px; cursor: pointer; padding: 4px 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border-radius: 14px;
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: 16px; font-family: inherit; line-height: 1.3;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold-leaf); color: var(--indigo-deep); box-shadow: 0 8px 22px rgba(201, 154, 62, .35); }
.btn-ghost { border: 1.5px solid rgba(247, 240, 225, .45); color: var(--ivory); background: rgba(247, 240, 225, .04); }
.btn-dark { background: #000; color: #fff; }
.btn-outline { border: 1.5px solid var(--rule); color: var(--ink); background: var(--ivory-card); }
.btn .stack { display: flex; flex-direction: column; text-align: start; }
.btn .stack small { font-weight: 500; font-size: 11.5px; opacity: .75; letter-spacing: .02em; }
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.badge { display: inline-block; line-height: 0; transition: transform .15s ease; }
.badge:hover { transform: translateY(-1px); }
.badge img { height: 52px; width: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--ivory); overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 70% 40%, rgba(158, 35, 40, .35), transparent 70%);
}
[dir="rtl"] .hero::after { background: radial-gradient(60% 70% at 30% 40%, rgba(158, 35, 40, .35), transparent 70%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 72px 20px 88px; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 4px; }
.title-fa {
  font-family: var(--display-fa); font-size: clamp(56px, 9vw, 96px); line-height: 1.55; margin: 0;
  background: var(--gold-leaf); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.title-en { font-family: var(--display-en); font-size: clamp(18px, 2.4vw, 24px); letter-spacing: .36em; text-transform: uppercase; color: var(--gold-light); margin: -6px 0 22px; }
.lead { font-size: clamp(17px, 2vw, 20px); margin: 0 0 28px; color: rgba(247, 240, 225, .9); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-sub { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; font-size: 15px; }
.cta-sub a { color: var(--gold-light); text-decoration: none; border-bottom: 1px dashed rgba(230, 196, 122, .5); }
.req { font-size: 13px; color: rgba(247, 240, 225, .6); margin-top: 14px; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 520px; }
.hero-visual .emblem {
  position: absolute; width: 78%; max-width: 420px; border-radius: 32px; opacity: .95;
  transform: translateX(-18%) rotate(-6deg); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
[dir="rtl"] .hero-visual .emblem { transform: translateX(18%) rotate(6deg); }
.hero-visual .phone { position: relative; width: min(270px, 62%); transform: translateX(22%); }
[dir="rtl"] .hero-visual .phone { transform: translateX(-22%); }

/* ---------- Device frames ---------- */
.phone {
  border-radius: 44px; padding: 10px; background: linear-gradient(160deg, #3a3a44, #0c0c10 40%, #2a2a33);
  box-shadow: 0 0 0 1.5px #55555f inset, 0 30px 70px rgba(0, 0, 0, .45);
}
.phone img { border-radius: 35px; width: 100%; }
.tablet {
  border-radius: 30px; padding: 12px; background: linear-gradient(160deg, #3a3a44, #0c0c10 40%, #2a2a33);
  box-shadow: 0 0 0 1.5px #55555f inset, 0 30px 70px rgba(0, 0, 0, .35);
}
.tablet img { border-radius: 19px; width: 100%; }
.watch {
  border-radius: 46px; padding: 14px; background: linear-gradient(160deg, #3a3a44, #0c0c10 40%, #2a2a33);
  box-shadow: 0 0 0 1.5px #55555f inset, 0 24px 50px rgba(0, 0, 0, .35); position: relative;
}
.watch img { border-radius: 34px; width: 100%; }
.mac { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 30px 70px rgba(0, 0, 0, .3); background: #fff; }
.mac img { width: 100%; }

/* ---------- Daily couplet ---------- */
.daily {
  margin: -44px auto 0; position: relative; z-index: 2; max-width: 860px;
  background: var(--ivory-card); border-radius: var(--radius); border: 1px solid var(--rule);
  padding: 30px 26px 26px; text-align: center; box-shadow: 0 24px 50px rgba(13, 22, 48, .14);
}
.daily::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid var(--rule); border-radius: 16px; pointer-events: none;
}
.daily .label { color: var(--gold); font-weight: 700; letter-spacing: .08em; font-size: 14px; }
.couplet { font-size: clamp(20px, 3.2vw, 27px); line-height: 2.05; margin: 8px 0; direction: rtl; }
.couplet .m { display: block; }
.daily .source { color: var(--ink-soft); font-size: 15px; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-title { text-align: center; margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 36px); }
.section-sub { text-align: center; color: var(--ink-soft); margin: 0 auto 20px; max-width: 620px; font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 56px; }
.stat { text-align: center; padding: 18px 10px; border-radius: 18px; background: var(--ivory-card); border: 1px solid var(--rule); }
.stat b { display: block; font-size: 28px; color: var(--madder); line-height: 1.2; }
.stat span { color: var(--ink-soft); font-size: 14px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--ivory-card); border: 1px solid var(--rule); border-radius: 20px; padding: 24px; transition: transform .2s ease, box-shadow .2s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature h3 { margin: 14px 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.feature .icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--indigo); color: var(--gold-light); font-size: 21px; box-shadow: 0 0 0 1px var(--gold) inset;
}

/* ---------- Screenshots ---------- */
.shots-section { background: var(--indigo-deep); color: var(--ivory); }
.shots-section .section-sub { color: rgba(247, 240, 225, .7); }
.tabs { display: flex; justify-content: center; gap: 6px; margin: 0 auto 36px; padding: 5px; width: fit-content; border-radius: 999px; background: rgba(247, 240, 225, .07); border: 1px solid rgba(230, 196, 122, .25); flex-wrap: wrap; }
.tabs button {
  font: inherit; font-size: 15px; border: 0; background: none; color: rgba(247, 240, 225, .75); padding: 8px 18px; border-radius: 999px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--gold-leaf); color: var(--indigo-deep); font-weight: 700; }
.gallery { display: none; }
.gallery.active { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 26px; justify-content: safe center; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.gallery figcaption { margin-top: 14px; font-size: 15px; color: rgba(247, 240, 225, .8); }
.gallery .phone { width: 250px; }
.gallery .tablet { width: 440px; }
.gallery .watch { width: 210px; }
.gallery .mac { width: min(860px, 88vw); }
.gallery::-webkit-scrollbar { height: 6px; }
.gallery::-webkit-scrollbar-thumb { background: rgba(230, 196, 122, .4); border-radius: 3px; }

/* ---------- Download ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.platform { background: var(--ivory-card); border: 1px solid var(--rule); border-radius: 20px; padding: 24px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.platform .glyph { font-size: 34px; color: var(--indigo); height: 44px; display: grid; place-items: center; }
.platform .glyph svg { width: 40px; height: 40px; }
.platform h3 { margin: 0; font-size: 19px; }
.platform p { margin: 0; color: var(--ink-soft); font-size: 14.5px; flex: 1; }
.platform .badge img { height: 44px; }
.platform .btn { padding: 9px 16px; font-size: 14.5px; border-radius: 10px; }

/* ---------- Creator ---------- */
.creator { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; background: var(--ivory-card); border: 1px solid var(--rule); border-radius: 26px; padding: 34px; box-shadow: var(--shadow); }
.creator .avatar { width: 108px; height: 108px; border-radius: 28px; overflow: hidden; box-shadow: 0 0 0 3px var(--gold); }
.creator h3 { margin: 0 0 6px; font-size: 22px; }
.creator p { margin: 0 0 16px; color: var(--ink-soft); }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--rule); color: var(--ink); background: var(--ivory); font-size: 14.5px; font-weight: 600;
}
.chip:hover { border-color: var(--gold); }
.chip svg { width: 17px; height: 17px; }
.chip.donate { background: var(--madder); color: var(--ivory); border-color: var(--madder); }

/* ---------- Content pages ---------- */
.page-hero { color: var(--ivory); text-align: center; padding: 64px 20px 72px; }
.page-hero h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); }
.page-hero p { margin: 8px 0 0; color: rgba(247, 240, 225, .75); }
.prose { background: var(--ivory-card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 36px 34px; margin: -40px auto 80px; position: relative; box-shadow: var(--shadow); }
.prose h2 { font-size: 22px; margin: 30px 0 8px; color: var(--indigo); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #37334a; }
.prose .updated { color: var(--ink-soft); font-size: 14px; }
details { border: 1px solid var(--rule); border-radius: 14px; padding: 12px 18px; margin: 10px 0; background: var(--ivory); }
details summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 6px; }

/* ---------- Shared-link pages ---------- */
.poem-page { padding: 40px 0 70px; }
.poem-card {
  background: var(--ivory-card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 34px 26px; max-width: 760px; margin: 0 auto; box-shadow: var(--shadow);
}
.poem-head { text-align: center; margin-bottom: 18px; }
.poem-head .poet { color: var(--gold); font-weight: 700; }
.poem-head h1 { font-family: var(--display-fa); font-weight: 700; font-size: 34px; margin: 6px 0 4px; line-height: 1.8; }
.poem-head .meta { color: var(--ink-soft); font-size: 14px; }
.verses { margin-top: 18px; direction: rtl; }
.beyt { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 10px 12px; border-radius: 12px; font-size: 21px; line-height: 2; }
.beyt .m1 { text-align: right; } .beyt .m2 { text-align: left; }
.beyt.single { grid-template-columns: 1fr; text-align: center; }
.beyt.focus { background: #f2e4bf; box-shadow: inset 0 0 0 1.5px var(--gold); animation: glow 2.6s ease-out 1; }
@keyframes glow { 0% { box-shadow: inset 0 0 0 3px var(--gold), 0 0 26px rgba(201, 154, 62, .6); } 100% { box-shadow: inset 0 0 0 1.5px var(--gold); } }
.open-app {
  position: sticky; bottom: 14px; margin: 26px auto 0; max-width: 760px;
  background: var(--indigo); color: var(--ivory); border-radius: 18px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1.5px solid var(--gold);
}
.open-app .t { font-weight: 700; }
.open-app .s { font-size: 13px; opacity: .75; }
.loading { text-align: center; color: var(--ink-soft); padding: 40px 0; }
.credit { text-align: center; color: var(--ink-soft); font-size: 14px; margin-top: 20px; }
.poem-card ul { padding-inline-start: 22px; }

/* ---------- Footer ---------- */
footer { background: var(--indigo-deep); color: rgba(247, 240, 225, .75); padding: 54px 0 34px; font-size: 14.5px; }
footer a { color: var(--gold-light); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h4 { color: var(--ivory); margin: 0 0 10px; font-size: 15px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.foot-brand img { width: 42px; height: 42px; border-radius: 10px; }
.foot-brand span { font-family: var(--display-fa); font-size: 22px; color: var(--ivory); padding-top: 8px; }
.foot-bottom { border-top: 1px solid rgba(230, 196, 122, .2); margin-top: 34px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13.5px; }


/* ---------- Story sections (numbered kickers, split layouts, proof, checks, closing) ---------- */
.kicker { color: var(--madder); font-weight: 700; letter-spacing: .08em; font-size: 14px; margin: 0 0 10px; }
.kicker.center { text-align: center; }
.shots-section .kicker, .close .kicker { color: var(--gold-light); }
.tinted { background: #f1e7d2; }
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.split h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 18px; color: var(--indigo); }
.split p { font-size: 17.5px; color: #3c3850; }
.split-visual { display: grid; place-items: center; position: relative; }
.split-visual::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(201, 154, 62, .28), transparent 68%); }
.split-visual .phone { width: min(280px, 78%); position: relative; }
.feature .num { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--gold); letter-spacing: .1em; }
.proof { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.proof article { background: var(--indigo); color: var(--ivory); border-radius: 20px; padding: 24px; border: 1px solid rgba(201, 154, 62, .5); }
.proof strong { display: block; font-size: 34px; line-height: 1.2; background: var(--gold-leaf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.proof span { color: rgba(247, 240, 225, .8); font-size: 15px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.checks li { position: relative; padding-inline-start: 34px; font-size: 16.5px; color: #3c3850; }
.checks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--indigo); color: var(--gold-light); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.close { color: var(--ivory); text-align: center; padding: 96px 0; }
.close h2 { font-size: clamp(28px, 4vw, 44px); margin: 8px 0 28px; }
.close-couplet { font-size: clamp(18px, 2.6vw, 24px); line-height: 2.1; color: var(--gold-light); margin: 0; direction: rtl; }
.share { display: flex; align-items: center; gap: 18px; max-width: 520px; margin: 40px auto 0; padding: 16px 20px; border-radius: 18px; background: rgba(247, 240, 225, .06); border: 1px solid rgba(230, 196, 122, .3); text-align: start; }
.share img { background: #fff; border-radius: 10px; padding: 6px; flex-shrink: 0; }
.share p { margin: 0; font-size: 15px; color: rgba(247, 240, 225, .85); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .checks { text-align: start; }
  .proof { grid-template-columns: 1fr; }
  .share { flex-direction: column; text-align: center; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; flex-direction: column; background: var(--indigo-deep); padding: 10px 16px 16px; border-bottom: 1px solid rgba(201, 154, 62, .35); }
  .nav.open { display: flex; }
  .menu-btn { display: block; margin-inline-start: auto; }
  .hero-inner { grid-template-columns: 1fr; padding: 44px 16px 80px; gap: 20px; text-align: center; }
  .lead { margin-inline: auto; }
  .cta, .cta-sub { justify-content: center; }
  .hero-visual { min-height: 420px; }
  .features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gallery.active { justify-content: flex-start; }
  .gallery .tablet { width: 82vw; }
  .gallery .phone { width: 220px; }
  .creator { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .links { justify-content: center; }
  .wrap { padding: 0 16px; }
  section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .platform-grid, .foot-grid { grid-template-columns: 1fr; }
  .beyt { grid-template-columns: 1fr; gap: 0; }
  .prose { padding: 26px 20px; }
  .brand .en { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beyt.focus { animation: none; }
  .btn, .feature, .badge { transition: none; }
}
