/* Dawat design system: emerald, gold and ivory. Serif headings, clean sans body. */
@font-face { font-family: "Manrope"; src: url("/fonts/Manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/Cormorant-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("/fonts/Cormorant-italic-latin.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Nastaliq"; src: url("/fonts/NotoNastaliqUrdu.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --emerald: #0F4C3A; --emerald-deep: #0A3328; --emerald-soft: #1B6B54;
  --gold: #C9A24B; --gold-deep: #7A5F18; --gold-soft: #E6CD8A;
  --ivory: #FBF7EE; --sand: #F2EAD6; --paper: #FFFFFF;
  --ink: #1D1A16; --muted: #5C564C; --line: rgba(29, 26, 22, .12);
  --burgundy: #7B1E3A; --ok: #1F7A4D; --warn: #B4561A; --bad: #A12A2A;
  --radius: 14px; --shadow: 0 18px 40px -18px rgba(10, 51, 40, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-variant-numeric: lining-nums; margin: 0; background: var(--ivory); color: var(--ink); font: 400 17px/1.65 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
img, svg, canvas { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--emerald); text-underline-offset: 3px; }
a:hover { color: var(--emerald-soft); }
h1, h2, h3, h4 { font-family: "Cormorant", "Times New Roman", serif; font-weight: 600; line-height: 1.08; margin: 0 0 .5em; color: var(--emerald-deep); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.ur { font-family: "Nastaliq", "Noto Nastaliq Urdu", serif; direction: rtl; line-height: 2.1; font-weight: 400; }
.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--emerald-deep); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 247, 238, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; padding: 10px 14px; border-radius: 999px; transition: background .2s var(--ease), color .2s; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sand); color: var(--emerald-deep); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: pointer; color: var(--emerald-deep); }
.mobile-nav { display: none; padding: 8px 24px 18px; border-top: 1px solid var(--line); background: var(--ivory); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 12px 4px; font-weight: 700; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: 700 1rem/1 "Manrope", sans-serif; padding: 16px 26px; border-radius: 999px; text-decoration: none; transition: transform .2s var(--ease), background .2s, box-shadow .2s; min-height: 50px; touch-action: manipulation; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--emerald); color: var(--ivory); box-shadow: 0 10px 24px -12px rgba(15, 76, 58, .8); }
.btn-primary:hover { background: var(--emerald-soft); color: #fff; transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #2A2008; }
.btn-gold:hover { background: var(--gold-soft); color: #2A2008; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--emerald-deep); box-shadow: inset 0 0 0 1.5px var(--emerald); }
.btn-ghost:hover { background: var(--emerald); color: var(--ivory); }
.btn-sm { padding: 11px 18px; min-height: 42px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 84px; background: radial-gradient(900px 500px at 85% 10%, rgba(201, 162, 75, .22), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(15, 76, 58, .12), transparent 60%), var(--ivory); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: url("/img/star-pattern.svg"); background-size: 90px; opacity: .06; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--gold-deep); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 24px; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; list-style: none; font-size: .95rem; font-weight: 600; color: var(--emerald-deep); }
.proof li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; background: var(--gold); transform: rotate(45deg); }

.demo { position: relative; perspective: 1400px; }
.demo-stage { position: relative; transform-style: preserve-3d; transition: transform .25s var(--ease); }
.demo-card { position: relative; margin-inline: auto; width: min(100%, 400px); border-radius: 6px; box-shadow: 0 40px 60px -28px rgba(10, 51, 40, .6), 0 6px 14px rgba(10, 51, 40, .15); background: #fff; }
.demo-card canvas { width: 100%; height: auto; border-radius: 6px; }
.demo-ghost { position: absolute; top: 24px; width: 46%; border-radius: 6px; box-shadow: 0 24px 40px -22px rgba(10, 51, 40, .5); opacity: .95; }
.demo-ghost.l { left: -4%; transform: translateZ(-80px) rotate(-9deg); }
.demo-ghost.r { right: -4%; transform: translateZ(-80px) rotate(9deg) translateY(14px); }
.demo-form { margin: 22px auto 0; width: min(100%, 400px); display: grid; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.demo-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-form .tag { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }

/* forms */
label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; color: var(--emerald-deep); }
input, select, textarea { width: 100%; font: 500 1rem/1.3 "Manrope", sans-serif; padding: 13px 14px; border: 1.5px solid #D9D0BC; border-radius: 12px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; min-height: 48px; }
input:focus, select:focus, textarea:focus { border-color: var(--emerald); box-shadow: 0 0 0 4px rgba(15, 76, 58, .12); outline: none; }
textarea { min-height: 84px; resize: vertical; }
input[type=range] { padding: 0; min-height: 36px; accent-color: var(--emerald); border: 0; box-shadow: none; background: transparent; }
input[type=file] { padding: 10px; background: var(--ivory); }
.demo-form .photo-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.demo-form .photo-row input[type=file] { flex: 1 1 200px; min-height: 44px; font-size: .9rem; }
.field { margin-bottom: 14px; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 5px; }
.error { color: var(--bad); font-weight: 600; font-size: .95rem; }
.seg { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font: 700 .9rem "Manrope", sans-serif; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--emerald); color: var(--ivory); }

/* sections */
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.section.sand { background: var(--sand); }
.section.dark { background: var(--emerald-deep); color: var(--ivory); }
.section.dark h2, .section.dark h3 { color: var(--ivory); }
.section.dark .lead { color: rgba(251, 247, 238, .8); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section.dark .section-head p { color: rgba(251, 247, 238, .78); }

.grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-link { display: block; text-decoration: none; color: inherit; }
.design { position: relative; transform-style: preserve-3d; transition: transform .35s var(--ease); }
.design .thumb { position: relative; border-radius: 8px; overflow: hidden; background: var(--sand); box-shadow: 0 16px 30px -18px rgba(10, 51, 40, .55); transition: box-shadow .35s; }
.design .thumb img { width: 100%; height: auto; }
.design .glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(260px 260px at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .35), transparent 60%); opacity: 0; transition: opacity .3s; }
.design:hover .glare { opacity: 1; }
.design:hover .thumb { box-shadow: 0 30px 44px -22px rgba(10, 51, 40, .7); }
.design h3 { font-size: 1.15rem; font-family: "Manrope", sans-serif; font-weight: 700; margin: 14px 0 2px; color: var(--ink); line-height: 1.3; }
.design .meta { font-size: .88rem; color: var(--muted); }
.tilt { will-change: transform; }

.cat-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cat { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.cat img { width: 96px; height: auto; border-radius: 5px; box-shadow: 0 10px 18px -10px rgba(10, 51, 40, .6); }
.cat h3 { font-size: 1.25rem; margin: 0 0 2px; }
.cat .ur { font-size: 1rem; color: var(--gold-deep); line-height: 1.7; margin: 0; }
.cat small { color: var(--muted); font-size: .85rem; }

.steps { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.step { position: relative; padding: 28px 24px 24px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: -18px; left: 22px; width: 38px; height: 38px; display: grid; place-items: center; background: var(--gold); color: #2A2008; border-radius: 50%; font: 700 1.2rem "Cormorant", serif; }
.step h3 { font-size: 1.3rem; margin-top: 8px; }
.step p { margin: 0; color: var(--muted); }

.features { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature h3 { font-size: 1.35rem; }
.feature p { color: var(--muted); margin: 0; }
.section.dark .feature p { color: rgba(251, 247, 238, .78); }
.feature .mark { width: 46px; height: 46px; margin-bottom: 14px; color: var(--gold); }

/* pricing */
.plans { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 30px 26px; }
.plan.popular { border: 2px solid var(--gold); box-shadow: var(--shadow); }
.plan .badge { position: absolute; top: -14px; left: 24px; background: var(--gold); color: #2A2008; font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.5rem; margin-bottom: 4px; }
.price { font: 600 3rem/1 "Cormorant", serif; color: var(--emerald-deep); margin: 12px 0 2px; font-variant-numeric: tabular-nums; }
.price small { font: 600 1rem "Manrope", sans-serif; color: var(--muted); }
.plan .usd { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.plan ul { padding: 0; margin: 14px 0 24px; list-style: none; display: grid; gap: 9px; flex: 1; }
.plan li { padding-left: 26px; position: relative; font-size: .97rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 2.5px solid var(--emerald); border-bottom: 2.5px solid var(--emerald); transform: rotate(-45deg) translateY(-3px); }

/* faq */
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; margin-bottom: 12px; transition: border-color .2s; }
.faq details[open] { border-color: var(--gold); }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 600 1.6rem/1 "Cormorant", serif; color: var(--gold-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 0 18px; color: var(--muted); }

.cta-band { background: var(--emerald); color: var(--ivory); border-radius: 22px; padding: clamp(34px, 6vw, 64px); display: grid; gap: 18px; justify-items: start; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; background: url("/img/star-pattern.svg") center/80px; opacity: .14; transform: rotate(12deg); }
.cta-band h2 { color: var(--ivory); margin: 0; }
.cta-band p { color: rgba(251, 247, 238, .85); margin: 0; max-width: 40em; }

.crumbs { font-size: .9rem; color: var(--muted); padding: 18px 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #b9ae96; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--emerald); text-decoration: underline; }

.page-hero { padding: 36px 0 28px; }
.page-hero p.lead { margin-bottom: 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 2rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.quote { border-left: 4px solid var(--gold); padding: 6px 0 6px 18px; margin: 14px 0; font: italic 500 1.25rem/1.5 "Cormorant", serif; color: var(--emerald-deep); }
.quote.ur { font-style: normal; border-left: 0; border-right: 4px solid var(--gold); padding: 6px 18px 6px 0; font-size: 1.1rem; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--sand); font-weight: 700; font-size: .85rem; color: var(--emerald-deep); text-decoration: none; margin: 0 6px 8px 0; }
a.pill:hover { background: var(--gold-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* editor */
.editor { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: start; padding: 20px 0 64px; }
.editor-stage { position: sticky; top: 92px; }
.editor-stage .frame { background: #E9E1CE; border-radius: 18px; padding: clamp(14px, 3vw, 34px); display: grid; place-items: center; }
.editor-stage canvas { width: 100%; max-width: 520px; height: auto; border-radius: 4px; box-shadow: 0 30px 50px -26px rgba(10, 51, 40, .7), 0 4px 10px rgba(0, 0, 0, .12); background: #fff; }
.editor-stage.landscape canvas { max-width: 640px; }
.stage-note { text-align: center; font-size: .88rem; color: var(--muted); margin: 12px 0 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.6rem; margin-bottom: 14px; }
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fields-grid .full { grid-column: 1 / -1; }
.items-title { grid-column: 1 / -1; font-weight: 800; color: var(--gold-deep); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin: 10px 0 8px; }
.variants { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.variants a { flex: 0 0 82px; scroll-snap-align: start; border-radius: 6px; overflow: hidden; outline-offset: 2px; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .4); }
.variants a[aria-current="true"] { outline: 3px solid var(--gold); }
.variants img { width: 100%; height: auto; }
.price-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.plan-pick { flex: 1 1 140px; text-align: left; cursor: pointer; background: #fff; border: 1.5px solid #D9D0BC; border-radius: 12px; padding: 12px 14px; font: 600 .9rem "Manrope", sans-serif; color: var(--ink); transition: border-color .15s, background .15s; }
.plan-pick strong { display: block; font: 600 1.45rem "Cormorant", serif; color: var(--emerald-deep); font-variant-numeric: tabular-nums; }
.plan-pick[aria-pressed="true"] { border-color: var(--emerald); background: #EFF6F2; box-shadow: 0 0 0 3px rgba(15, 76, 58, .12); }
.unlocked { border: 2px solid var(--ok); background: #F0F8F3; }
.status-line { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ok); }
.dl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.note { font-size: .9rem; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(30px); background: var(--emerald-deep); color: var(--ivory); padding: 14px 20px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: .3s var(--ease); z-index: 200; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* tables (checkout, admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sand); font-weight: 800; color: var(--emerald-deep); white-space: nowrap; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.tag.pending { background: #FFF1D6; color: #8A5A00; }
.tag.review { background: #E1ECFF; color: #1B4B9B; }
.tag.approved { background: #DDF3E6; color: #17653D; }
.tag.rejected, .tag.expired { background: #FBE1E1; color: #8E2222; }

.pay-box { background: var(--sand); border-radius: 14px; padding: 18px; margin: 16px 0; }
.pay-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.pay-box dt { font-weight: 700; color: var(--emerald-deep); }
.pay-box dd { margin: 0; word-break: break-word; }
.countdown { font: 600 1.6rem "Cormorant", serif; color: var(--burgundy); font-variant-numeric: tabular-nums; }

/* footer */
.site-footer { background: var(--emerald-deep); color: rgba(251, 247, 238, .82); padding: 64px 0 28px; font-size: .95rem; }
.site-footer .foot-h { color: var(--gold-soft); font-weight: 800; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer a { color: rgba(251, 247, 238, .82); text-decoration: none; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; gap: 34px; grid-template-columns: 1.3fr repeat(4, 1fr); }
.foot-brand img { height: 44px; width: auto; margin-bottom: 14px; }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(251, 247, 238, .16); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .88rem; }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-grid, .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-stage { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .section { padding: 60px 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .fields-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .demo-form .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
