/* =====================================================================
   Zamam page layer — shared core for the top-pages prototypes.
   Same language as home + sar-kitab v2: fixed sky, seamless sections,
   gold hairlines, glass cards. Each page sets its own mood variables.
   ===================================================================== */
html.zp { --zp-accent: var(--zp-gold); --zp-accent-2: var(--zp-violet); --zp-on-accent: #1d0f2e;
  --zp-btn: linear-gradient(120deg, #f6d38a 0%, #f2c46d 30%, #e9a3ff 75%, #a78bfa 100%); --zp-btn-light: linear-gradient(120deg, #c99a3e 0%, #a8741a 40%, #6d28d9 100%);
  --zp-h1: linear-gradient(100deg, #fff0c4 0%, #f2c46d 35%, #e9b8ff 70%, #a5b4fc 100%); --zp-h1-light: linear-gradient(100deg, #1e2a78, #4c1d95 50%, #8a5a10);
  --zp-hero-shade-dark: linear-gradient(180deg, rgba(7,5,26,.55) 0%, rgba(7,5,26,.35) 40%, var(--zp-bg) 100%);
  --zp-hero-shade-light: linear-gradient(180deg, rgba(246,238,219,.55) 0%, rgba(246,238,219,.45) 45%, var(--zp-bg) 100%); }
html.zp, html.zp body { background: var(--zp-bg); color: var(--zp-ink); }
html.zp body { font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif; overflow-x: clip; }
html.zp .zp-sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
html.zp .zp-sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
html.zp main { position: relative; z-index: 1; background: transparent; }
html.zp .site-footer, html.zp footer { position: relative; z-index: 1; }

/* ---------- buttons & headings follow the mood ---------- */
html.zp .btn-primary { background: var(--zp-btn) !important; color: var(--zp-on-accent) !important; border: 0 !important; font-weight: 800; box-shadow: 0 14px 34px -16px color-mix(in srgb, var(--zp-accent) 80%, transparent); }
html.zp[data-theme="light"] .btn-primary { background: var(--zp-btn-light) !important; color: #fff !important; }
html.zp .tl-hero-banner h1 { background: var(--zp-h1); -webkit-background-clip: text; background-clip: text; color: transparent; }
html.zp[data-theme="light"] .tl-hero-banner h1 { background: var(--zp-h1-light); -webkit-background-clip: text; background-clip: text; }

/* ---------- arch hero → full-bleed stage (same move as sar-kitab v2) ---------- */
html.zp .tl-hero-banner--arch { position: relative; min-height: clamp(520px, 74vh, 720px); display: grid; align-items: center; overflow: hidden; padding: 0 !important; margin: 0 calc(50% - 50vw) !important; background: none !important; }
html.zp .tl-hero-banner--arch .tl-hero-arch { position: static; display: block; max-width: none; width: 100%; padding: 0; margin: 0; }
html.zp .tl-hero-banner--arch .tl-hero-arch__frame { position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important; max-width: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; aspect-ratio: auto !important; z-index: 0; background: var(--zp-hero-img, none) center 40% / cover no-repeat; transform: none !important; }
html.zp .tl-hero-banner--arch .tl-hero-arch__frame::before, html.zp .tl-hero-banner--arch .tl-hero-arch__frame::after { content: none !important; }
html.zp .tl-hero-banner--arch .tl-hero-arch__frame video { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; opacity: .9; }
html.zp .tl-hero-banner--arch .tl-hero-arch__shade { position: absolute; inset: 0; z-index: 1; border-radius: 0 !important; background: var(--zp-hero-shade-dark) !important; }
html.zp[data-theme="light"] .tl-hero-banner--arch .tl-hero-arch__shade { background: var(--zp-hero-shade-light) !important; }
html.zp .tl-hero-banner--arch .tl-hero-arch__copy { position: relative; z-index: 3; max-width: 900px; margin: 0 auto !important; padding: 96px 20px 110px !important; text-align: center; display: flex; flex-direction: column; align-items: center; }
html.zp .tl-hero-banner--arch h1 { font-size: clamp(2rem, 4.6vw, 3.5rem) !important; line-height: 1.45; font-weight: 900; max-width: 17ch; margin: 1rem auto .7rem !important; text-wrap: balance; filter: drop-shadow(0 4px 22px rgba(0,0,0,.55)); }
html.zp[data-theme="light"] .tl-hero-banner--arch h1 { filter: drop-shadow(0 2px 14px rgba(255,250,238,.9)); }
html.zp .tl-hero-banner--arch .tl-hero__lead { font-size: clamp(1rem, 1.6vw, 1.2rem); color: color-mix(in srgb, var(--zp-ink) 92%, transparent); max-width: 44ch; margin: 0 auto 1.4rem; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
html.zp[data-theme="light"] .tl-hero-banner--arch .tl-hero__lead { text-shadow: 0 1px 10px rgba(255,250,238,.95); }
html.zp .tl-hero-banner--arch .tl-hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
html.zp .tl-hero-banner--arch .tl-hero__actions .btn { min-height: 52px; padding-inline: 1.6rem; border-radius: 14px; }
html.zp .tl-hero__badge { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem 1rem; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--zp-gold-3); border: 1px solid var(--zp-card-brd-hi); background: color-mix(in srgb, var(--zp-bg) 55%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html.zp[data-theme="light"] .tl-hero__badge { color: var(--zp-gold-2); background: rgba(255,255,255,.75); }
html.zp .zp-hero-decor { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
html.zp .zp-scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border-radius: 14px; border: 1.5px solid var(--zp-card-brd-hi); z-index: 3; }
html.zp .zp-scroll-cue::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--zp-gold); animation: zpCue 1.8s ease-in-out infinite; }
@keyframes zpCue { 50% { transform: translateY(12px); opacity: .3; } }

/* ---------- reveal ---------- */
html.zp .zp-rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--zp-ease, ease), transform .8s var(--zp-ease, ease); }
html.zp .zp-rv.zp-in, body.shot .zp-rv, html.zp.zp-reduce .zp-rv { opacity: 1; transform: none; }

/* ---------- shared stage (ritual + result) ---------- */
.zp-stage { position: relative; margin-top: 22px; border-radius: var(--zp-r, 26px); border: 1px solid var(--zp-card-brd); background: var(--zp-card); box-shadow: var(--zp-shadow); padding: clamp(18px, 3vw, 34px); overflow: hidden; isolation: isolate; }
.zp-stage[hidden] { display: none; }
.zp-eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 800; letter-spacing: .02em; color: var(--zp-gold); }
.zp-eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
.zp-title { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 900; line-height: 1.5; margin: .3rem 0 .4rem; color: var(--zp-ink); }
.zp-muted { color: var(--zp-muted); }
.zp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.zp-chip { display: inline-flex; align-items: center; gap: 6px; padding: .3rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--zp-ink); background: color-mix(in srgb, var(--zp-ink) 6%, transparent); border: 1px solid var(--zp-card-brd); }
.zp-chip b { color: var(--zp-gold); }
.zp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.zp-grid2 > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* an odd last panel spans the row: no empty half */
.zp-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .zp-grid2, .zp-grid3 { grid-template-columns: 1fr; } }
.zp-panel { padding: 16px 18px; border-radius: 18px; border: 1px solid var(--zp-card-brd); background: color-mix(in srgb, var(--zp-ink) 3%, transparent); min-width: 0; }
.zp-panel h3 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 800; color: var(--zp-gold); }
.zp-panel p { margin: 0 0 .5rem; line-height: 2; color: var(--zp-ink); }
.zp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.zp-actions .btn { flex: 1 1 auto; min-height: 46px; font-size: .9rem; justify-content: center; }
.zp-btn-lite { font: inherit; font-weight: 700; font-size: .88rem; padding: .6rem 1rem; border-radius: 12px; cursor: pointer; color: var(--zp-ink); background: color-mix(in srgb, var(--zp-ink) 6%, transparent); border: 1px solid var(--zp-card-brd); transition: border-color .2s, transform .2s; }
.zp-btn-lite:hover { border-color: var(--zp-card-brd-hi); transform: translateY(-1px); }
.zp-lock { position: relative; border-radius: 18px; overflow: hidden; min-height: 190px; border: 1px solid var(--zp-card-brd-hi); }
.zp-lock__blur { filter: blur(5px); opacity: .55; padding: 16px 18px; line-height: 2; user-select: none; }
.zp-lock__cta { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 16px; background: color-mix(in srgb, var(--zp-bg) 45%, transparent); }
.zp-lock__cta b { font-size: 1.05rem; }
.zp-steps { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.zp-steps li { flex: 1; position: relative; text-align: center; font-size: .74rem; font-weight: 700; color: var(--zp-soft); padding-top: 30px; transition: color .3s; }
.zp-steps li::before { content: attr(data-a); position: absolute; top: 0; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; color: var(--zp-gold); border: 1px solid var(--zp-card-brd-hi); background: var(--zp-bg); z-index: 1; transition: .3s; }
.zp-steps li::after { content: ""; position: absolute; top: 12.5px; left: calc(50% + 17px); width: calc(100% + 6px - 34px); height: 1.5px; background: var(--zp-card-brd); }
.zp-steps li:first-child::after { display: none; }
.zp-steps li.is-on { color: var(--zp-ink); }
.zp-steps li.is-on::before { color: var(--zp-on-accent); background: var(--zp-gold); border-color: var(--zp-gold); box-shadow: 0 0 16px color-mix(in srgb, var(--zp-gold) 60%, transparent); }
.zp-steps li.is-on::after { background: var(--zp-gold); }
.zp-toast { position: fixed; z-index: 460; top: 86px; left: 50%; transform: translate(-50%, -10px); padding: .65rem 1.1rem; border-radius: 12px; font-size: 13px; background: rgba(20,16,34,.94); color: #fff; opacity: 0; pointer-events: none; transition: .25s; max-width: 90vw; font-family: Vazirmatn, sans-serif; }
.zp-toast.on { opacity: 1; transform: translate(-50%, 0); }
.zp-fade { animation: zpFade .7s var(--zp-ease, ease) both; }
@keyframes zpFade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.zp-glyphs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.zp-glyphs span { position: absolute; font-weight: 800; color: var(--zp-glyph); font-size: var(--s, 40px); line-height: 1; animation: zpFloat var(--d, 22s) ease-in-out infinite alternate; }
.zp-glyphs span small { display: block; font-size: .32em; text-align: center; font-weight: 600; }
@keyframes zpFloat { from { transform: translate3d(0,0,0) rotate(-4deg); } to { transform: translate3d(10px,-26px,0) rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { html.zp *, html.zp *::before, html.zp *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
@media (max-width: 640px) {
  html.zp .tl-hero-banner--arch { min-height: 560px; }
  html.zp .tl-hero-banner--arch .tl-hero-arch__copy { padding: 70px 16px 92px !important; }
  html.zp .tl-hero-banner--arch .tl-hero__actions .btn { flex: 1 1 100%; }
  .zp-steps li { font-size: .64rem; }
}

/* map site/v2 + Q&A tokens to the page mood */
html.zp, html.zp[data-theme="light"], html.zp[data-theme="dark"] { --v2-violet: var(--zp-violet); --v2-card: var(--zp-card); --v2-card-brd: var(--zp-card-brd); --v2-gold: var(--zp-gold); --v2-gold-2: var(--zp-gold-2); --v2-gold-3: var(--zp-gold-3); --v2-glyph: var(--zp-glyph); }
html.zp .zq, html.zp[data-theme] .zq { --zq-accent: var(--zp-gold); --zq-card: var(--zp-card); --zq-card-2: color-mix(in srgb, var(--zp-ink) 4%, transparent); --zq-brd: var(--zp-card-brd); --zq-brd-hi: var(--zp-card-brd-hi); --zq-ink: var(--zp-ink); --zq-muted: var(--zp-muted); --zq-soft: var(--zp-soft); --zq-field: color-mix(in srgb, var(--zp-bg) 60%, transparent); }
html.zp #try .tool-trial { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
html.zp .tool-seo__notes li, html.zp .tool-seo .card, html.zp .tool-seo__grid > * { border-top-color: var(--zp-card-brd-hi) !important; }
html.zp .tool-seo__grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1100px; margin: 22px auto 0; }
@media (max-width: 960px) { html.zp .tool-seo__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { html.zp .tool-seo__grid { grid-template-columns: 1fr; } }
html.zp .tool-seo__card { background: var(--zp-card) !important; border: 1px solid var(--zp-card-brd) !important; border-radius: 20px !important; padding: 18px !important; box-shadow: var(--zp-shadow) !important; }
html.zp .tool-seo__num { background: var(--zp-btn) !important; color: var(--zp-on-accent) !important; border-radius: 50% !important; width: 34px !important; height: 34px !important; display: grid !important; place-items: center; font-weight: 900; }
html.zp[data-theme="light"] .tool-seo__num { background: var(--zp-btn-light) !important; color: #fff !important; }
html.zp .tool-seo__card-line { background: linear-gradient(90deg, var(--zp-card-brd-hi), transparent) !important; }
html.zp .tool-seo__card-body { color: var(--zp-muted) !important; line-height: 2 !important; }

/* ===== production: result stage inside tool-trial's result box ===== */
html.zp .tool-trial__result.zp-skinned { background: none; border: 0; box-shadow: none; padding: 0; }
html.zp .zp-skinned > .zp-stage { margin: 0 0 16px; }
html.zp .zp-dup { display: none !important; }
.zp-stage .zp-h { margin: 0 0 .5rem; font-size: 1rem; font-weight: 800; color: var(--zp-gold); }
.zp-small { font-size: .8rem; margin-top: 8px; }
.zp-center { text-align: center; margin: 0; }
/* the real journey lock (tool-trial.js appendLock) in the page palette */
html.zp .jrn-lock { border-radius: 18px; border: 1px solid var(--zp-card-brd-hi); background: var(--zp-card); box-shadow: var(--zp-shadow); overflow: hidden; }
html.zp .jrn-lock__title { color: var(--zp-ink); font-weight: 900; }
html.zp .jrn-lock__cta { background: var(--zp-btn); color: var(--zp-on-accent, #1a1033); border-radius: 999px; font-weight: 800; }
html.zp[data-theme="light"] .jrn-lock__cta { background: var(--zp-btn-light, var(--zp-btn)); color: #fff; }
html.zp .jrn-lock__trust, html.zp .jrn-lock__bits { color: var(--zp-muted); }
html.zp .trial-res__disc, html.zp .trial-res__note { color: var(--zp-soft); }
/* the default AI button / output keep working under the stage */
html.zp [data-trial-ai] { border-radius: 999px; }
html.zp .trial-ai-out { border-radius: 16px; border: 1px solid var(--zp-card-brd); background: var(--zp-card); }
@media print { .zp-sky, .zp-glyphs, .zp-hero-decor { display: none !important; } }
