/* =========================================================
   MadPDF — product page. Loaded after ../style.css (shared Madconfig
   components) and re-tunes its tokens: indigo + amber on the same dark console.
   ========================================================= */
:root {
  --green: #F5A623;            /* primary accent (amber pencil) */
  --cyan: #8E92FF;             /* secondary accent (indigo, lifted for dark bg) */
  --violet: #B49BFF;
  --indigo: #2B2F7A; --indigo2: #1E2260;
  --line: rgba(142,146,255,.18);
  --nastaliq: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  --naskh: "Noto Naskh Arabic", "Segoe UI", serif;
}
::selection { background: var(--green); color: #1d1300; }
.grad { background: linear-gradient(100deg, #A9ADFF, #C6A8FF 48%, #FFC25A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { color: var(--green); }
code { color: var(--cyan); background: rgba(142,146,255,.1); }

/* buttons in amber */
.btn { color: #1d1300; background: linear-gradient(110deg, #F5A623, #FFC85A); box-shadow: 0 10px 40px -10px rgba(245,166,35,.6); }
.btn:hover { box-shadow: 0 16px 50px -10px rgba(142,146,255,.7); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--cyan); box-shadow: none; }
.nav a::after { background: var(--green); }
.eyebrow { background: rgba(245,166,35,.06); border-color: rgba(245,166,35,.25); }
.dot { animation-name: mp-pulse; }
@keyframes mp-pulse { 0% { box-shadow: 0 0 0 0 rgba(245,166,35,.7); } 70% { box-shadow: 0 0 0 10px rgba(245,166,35,0); } 100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); } }
.tabs button.active { color: #1d1300; }
.ticks li::before { color: #1d1300; }
.faq a, .f-small a, .dl-note a { color: var(--cyan); }
.brand img, .f-brand img { border-radius: 8px; }

/* ---------- background (no WebGL here: soft moving light + grid) ---------- */
.mp-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    linear-gradient(rgba(142,146,255,.05) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(142,146,255,.05) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--bg);
  -webkit-mask: radial-gradient(120% 90% at 50% 0%, #000 40%, rgba(0,0,0,.35));
          mask: radial-gradient(120% 90% at 50% 0%, #000 40%, rgba(0,0,0,.35)); }
.mp-bg i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 26s ease-in-out infinite alternate; }
.mp-bg .b1 { width: 46vw; height: 46vw; right: -10vw; top: -12vw; background: #3B3FA8; }
.mp-bg .b2 { width: 34vw; height: 34vw; left: -12vw; top: 38vh; background: #5B3FA8; opacity: .35; animation-duration: 32s; }
.mp-bg .b3 { width: 26vw; height: 26vw; right: 18vw; bottom: -14vw; background: #A86A10; opacity: .3; animation-duration: 22s; }
@keyframes drift { to { transform: translate(-6vw, 8vh) scale(1.15); } }

main > section[id] { scroll-margin-top: 70px; }

/* ---------- top bar ---------- */
.mp-back { display: none; text-decoration: none; font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.mp-back:hover { color: var(--text); }

/* ---------- hero ---------- */
.mp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 40px; align-items: center; }
.mp-hero .hero-word { -webkit-text-stroke: 1px rgba(142,146,255,.13); }
.mp-title { font-family: var(--disp); font-weight: 700; font-size: clamp(36px, 5vw, 74px); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 24px; text-transform: uppercase; }
.mp-title .line { display: block; }

/* animated "PDF page" */
.paper-stage { position: relative; height: 600px; perspective: 1400px; z-index: 2; --rx: 0deg; --ry: 0deg; }
.paper { position: absolute; left: 50%; top: 50%; width: 360px; aspect-ratio: 1 / 1.414; margin: -254px 0 0 -180px; border-radius: 8px; transform-style: preserve-3d; }
.paper-back { background: linear-gradient(160deg, #2B2F7A, #1E2260); border: 1px solid rgba(142,146,255,.35); transform: rotateY(-18deg) rotateX(8deg) rotateZ(6deg) translate3d(70px, -30px, -120px); opacity: .9; }
.paper-mid { background: linear-gradient(160deg, #E9EAF6, #CFD1EA); transform: rotateY(-18deg) rotateX(8deg) rotateZ(2deg) translate3d(36px, -14px, -60px); opacity: .55; }
.paper-front { background: #F8F8FC; color: #1E2260; padding: 30px 30px 26px; overflow: hidden;
  box-shadow: 0 60px 120px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.4), 0 0 120px -10px rgba(142,146,255,.45);
  transform: rotateY(calc(-18deg + var(--ry))) rotateX(calc(8deg + var(--rx))) rotateZ(-2deg); transition: transform .4s ease-out; }
.pp-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #2B2F7A; padding-bottom: 10px; }
.pp-head b { font-family: var(--disp); font-size: 22px; letter-spacing: .12em; color: #2B2F7A; }
.pp-head span { font-family: var(--mono); font-size: 11px; color: #6B6F9A; }
.pp-lines { margin: 18px 0 6px; position: relative; }
.pp-lines i { display: block; height: 7px; width: var(--w); background: #DADCEC; border-radius: 4px; margin: 0 0 11px; position: relative; }
.pp-lines i.hl::after { content: ""; position: absolute; left: -3px; top: -4px; bottom: -4px; width: calc(100% + 6px); background: rgba(245,166,35,.55); border-radius: 3px; mix-blend-mode: multiply; animation: hl 9s infinite; }
.s-naskh p { font-family: var(--naskh); font-size: 20px; line-height: 1.8; margin: 6px 0 6px; }
.pp-rtl { font-family: var(--naskh); font-weight: 600; font-size: 21px; line-height: 1.8; margin: 0; text-align: right; color: #1E2260; animation: rtlin 9s infinite; }
.pp-ar { font-family: var(--naskh); font-size: 16px; line-height: 1.7; margin: 0 0 8px; text-align: right; color: #4A4E86; animation: rtlin 9s infinite; animation-delay: .4s; }
.pp-field { border: 1px solid #C9CBE6; background: #EEF0FF; border-radius: 5px; padding: 5px 10px 6px; font-family: var(--body); display: flex; flex-direction: column; width: 70%; }
.pp-field small { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #6B6F9A; }
.pp-type { font-size: 14px; font-weight: 600; color: #1E2260; white-space: nowrap; overflow: hidden; width: 12ch; border-right: 2px solid transparent; animation: typing 9s steps(12) infinite; }
.pp-sign { width: 62%; height: auto; display: block; margin: 12px 0 0 auto; }
.pp-sign path { fill: none; stroke: #2B2F7A; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 0; animation: sign 9s infinite; }
.pp-stamp { position: absolute; left: 30px; bottom: 30px; font-family: var(--mono); font-weight: 600; font-size: 11px; letter-spacing: .14em; color: #B26F00; border: 2px solid #E09500; border-radius: 6px; padding: 5px 9px; transform: rotate(-9deg); animation: stamp 9s infinite; }
.pp-redact { position: absolute; left: 30px; top: 100px; height: 11px; width: 46%; background: #0B0D1A; border-radius: 2px; animation: redact 9s infinite; }
.pp-pencil { position: absolute; width: 96px; height: 14px; right: 40px; bottom: 96px; border-radius: 3px 0 0 3px; transform-origin: 100% 50%; transform: rotate(-38deg); opacity: 0;
  background: linear-gradient(90deg, #F2B8C6 0 9%, #C9CBD6 9% 15%, #F5A623 15% 78%, #F3D9A4 78% 93%, #2B2F7A 93%);
  clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%); animation: pencil 9s infinite; }
@keyframes hl { 0%, 4% { clip-path: inset(0 100% 0 0); } 14%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes redact { 0%, 14% { width: 0; } 20%, 100% { width: 46%; } }
@keyframes rtlin { 0%, 20% { clip-path: inset(0 0 0 100%); } 34%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes typing { 0%, 36% { width: 0; border-color: #2B2F7A; } 50% { width: 12ch; border-color: #2B2F7A; } 54%, 100% { width: 12ch; border-color: transparent; } }
@keyframes sign { 0%, 54% { stroke-dashoffset: 520; } 76%, 100% { stroke-dashoffset: 0; } }
@keyframes pencil { 0%, 52% { opacity: 0; transform: translate(-150px, 30px) rotate(-38deg); } 56% { opacity: 1; } 64% { transform: translate(-80px, 10px) rotate(-34deg); } 76% { opacity: 1; transform: translate(0, 0) rotate(-38deg); } 82%, 100% { opacity: 0; transform: translate(30px, -30px) rotate(-38deg); } }
@keyframes stamp { 0%, 80% { opacity: 0; transform: rotate(-9deg) scale(1.8); } 84% { opacity: 1; transform: rotate(-9deg) scale(.95); } 87%, 100% { opacity: 1; transform: rotate(-9deg) scale(1); } }
.chip { position: absolute; z-index: 3; font-family: var(--mono); font-size: 13px; background: rgba(8,12,24,.88); border: 1px solid var(--line); backdrop-filter: blur(10px); padding: 10px 14px; border-radius: 10px; box-shadow: 0 20px 50px -15px rgba(0,0,0,.8); white-space: nowrap; animation: bob 6s ease-in-out infinite; }
.chip b { color: var(--green); margin-right: 4px; }
.chip [lang="ar"] { font-family: var(--naskh); font-size: 15px; }
.chip.ch1 { left: -2%; top: 8%; } .chip.ch2 { right: 0; top: 46%; animation-delay: -2s; } .chip.ch3 { right: 4%; bottom: 3%; animation-delay: -4s; }
.chip.ch2 b { color: #3CFFA0; } .chip.ch3 b { color: var(--cyan); }
@keyframes bob { 50% { transform: translateY(-10px); } }

/* ---------- strip ---------- */
.strip-track span[lang] { font-family: var(--naskh); font-weight: 600; letter-spacing: 0; }
.strip-track span[lang="ur"] { font-family: var(--nastaliq); font-size: .8em; line-height: 1.2; }

/* ---------- inside (screen) ---------- */
.screen3d { transform: none; border-color: rgba(142,146,255,.3); box-shadow: 0 60px 120px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.03), 0 0 120px -20px rgba(142,146,255,.35); }
.screen-bar { background: #10132A; }
.screen-bar span { color: var(--muted); font-family: var(--body); }
.screen-body { background: #F0F0F3; }
.float-chip b { color: var(--green); }
.float-chip.c2 b { color: var(--cyan); } .float-chip.c3 b { color: #3CFFA0; }
.nq { font-family: var(--nastaliq); font-size: 14px; } .nk { font-family: var(--naskh); font-size: 15px; }

/* ---------- features grid ---------- */
.mp-features { padding: 80px 0 120px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 18px; max-width: 1300px; margin: 0 auto; padding: 0 var(--pad); }
.fgrid .fcard { width: auto; min-height: 300px; padding-bottom: 56px; }
.fgrid .fcard h3 { font-size: 22px; }
.fgrid .fcard p { font-size: 14.5px; }
.f-ico { font-family: var(--mono), "Segoe UI Symbol", sans-serif; }

/* ---------- Arabic & Urdu ---------- */
.rtl-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 60px; align-items: center; padding: 120px var(--pad); max-width: 1400px; margin: 0 auto; }
.rtl-sec h2 { font-family: var(--disp); font-weight: 700; font-size: clamp(36px, 4.6vw, 64px); line-height: .98; letter-spacing: -.01em; margin: 0; text-transform: uppercase; }
.rtl-copy > p:not(.kicker) { color: #A9BCCB; font-size: 17px; margin: 24px 0; }
.mix { font-family: var(--mono); font-size: .9em; color: var(--cyan); unicode-bidi: isolate; }
.mix [lang="ar"] { font-family: var(--naskh); }
.rtl-viz { position: relative; perspective: 1400px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rtl-shot { grid-column: 1 / -1; margin: 0 0 -70px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(142,146,255,.3); box-shadow: 0 50px 100px -30px rgba(0,0,0,.9), 0 0 100px -20px rgba(142,146,255,.35); transform: rotateY(-10deg) rotateX(4deg); transform-origin: 30% 50%; }
.rtl-shot img { width: 100%; height: auto; }
.sample { position: relative; z-index: 1; padding: 16px 20px; border-radius: 14px; background: rgba(8,12,24,.92); border: 1px solid var(--line); backdrop-filter: blur(12px); box-shadow: 0 30px 70px -25px rgba(0,0,0,.9); text-align: right; }
.sample small { display: block; text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--green); }
.sample span { display: block; text-align: left; font-size: 13px; color: var(--muted); }
.s-ur p { font-family: var(--nastaliq); font-size: 21px; line-height: 2.3; margin: 2px 0 4px; color: var(--text); }
.s-ar p { font-family: var(--naskh); font-size: 20px; line-height: 1.8; margin: 6px 0 6px; color: var(--text); }
.s-ur { margin-left: -6%; }
.s-ar { margin-right: -3%; margin-top: 34px; border-color: rgba(245,166,35,.3); }

/* ---------- privacy ---------- */
.mp-privacy { padding: 100px 0 120px; }
.priv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; max-width: 1000px; margin: 0 auto; background: var(--line2); border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; }
.priv-big { background: rgba(6,9,18,.86); padding: 30px 26px; backdrop-filter: blur(8px); }
.priv-big b { display: block; font-family: var(--disp); font-size: clamp(56px, 7vw, 92px); line-height: 1; background: linear-gradient(120deg, #A9ADFF, #FFC25A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.priv-big span { color: var(--muted); font-size: 15px; }
.priv-online { max-width: 1000px; margin: 22px auto 0; padding: 26px 28px; border-radius: 14px; background: rgba(8,12,24,.82); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.mp-privacy .priv-grid, .mp-privacy .priv-online { width: calc(100% - 2 * var(--pad)); }
.priv-online h3 { font-family: var(--disp); font-size: 22px; margin: 0 0 12px; }
.priv-online ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 28px; color: #A9BCCB; font-size: 15px; }
.priv-online li { padding-left: 18px; position: relative; }
.priv-online li::before { content: "↗"; position: absolute; left: 0; color: var(--green); font-family: var(--mono); font-size: 12px; top: 3px; }
.priv-online b { color: var(--text); font-weight: 600; }

/* ---------- download ---------- */
.dl-card { background: radial-gradient(120% 90% at 50% 0%, rgba(142,146,255,.18), rgba(6,9,18,.92) 60%); border-color: rgba(142,146,255,.3); box-shadow: 0 50px 140px -40px rgba(142,146,255,.4); }
.dl-logo { box-shadow: 0 0 60px rgba(142,146,255,.5); }
.download h2 { overflow-wrap: anywhere; }
.dl-note a { overflow-wrap: anywhere; }

/* ---------- licence ---------- */
.mp-licence { padding: 0 var(--pad) 120px; }
.lic-card { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 22px; background: linear-gradient(135deg, rgba(43,47,122,.5), rgba(8,12,24,.9) 55%, rgba(245,166,35,.12)); border: 1px solid rgba(142,146,255,.28); backdrop-filter: blur(12px); }
.lic-card h2 { font-family: var(--disp); font-weight: 700; font-size: clamp(30px, 4vw, 54px); line-height: 1; margin: 0; text-transform: uppercase; }
.lic-body p { color: #A9BCCB; margin: 0 0 22px; font-size: 17px; }

/* ---------- contact ---------- */
.big-cta .mail { border-bottom-color: rgba(245,166,35,.4); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .mp-hero { grid-template-columns: 1fr; padding-bottom: 100px; }
  .paper-stage { height: 560px; }
  .rtl-sec { grid-template-columns: 1fr; }
  .lic-card { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .mp-back { display: inline; margin-left: auto; }
  .topbar { gap: 12px; }
  .paper-stage { height: 500px; margin: 0 -8px; }
  .paper { width: 290px; margin: -205px 0 0 -145px; padding: 22px 22px 20px; }
  .paper-front { padding: 22px; }
  .pp-rtl { font-size: 17px; } .pp-ar { font-size: 14px; } .pp-head b { font-size: 18px; }
  .pp-redact { top: 88px; left: 22px; } .pp-stamp { left: 22px; bottom: 22px; }
  .chip { font-size: 11.5px; padding: 8px 10px; }
  .chip.ch1 { left: 0; top: 4%; } .chip.ch2 { top: auto; bottom: 22%; } .chip.ch3 { right: 0; bottom: 2%; }
  .rtl-viz { grid-template-columns: 1fr; }
  .rtl-shot { transform: none; margin-bottom: 0; }
  .sample, .s-ur, .s-ar { margin: 0; }
  .priv-grid { grid-template-columns: 1fr; }
  .priv-online ul { grid-template-columns: 1fr; }
  .mp-title { font-size: clamp(32px, 9.4vw, 46px); }
}
@media (max-width: 370px) {
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-bg i, .chip, .pp-lines i.hl::after, .pp-rtl, .pp-ar, .pp-type, .pp-sign path, .pp-stamp, .pp-redact { animation: none !important; }
  .pp-pencil { display: none; }
  .paper-front { transition: none; }
}
