/* ═══════════════════════════════════════════════════════════════════════════════
   AiSabaq — Marketing / Revamp Layer (marketing.css)
   ──────────────────────────────────────────────────────────────────────────
   Sits on top of design-system.css + main.css. Carries the refreshed,
   ed-tech look (cards, motion, unified nav/footer) while staying on-brand:
   Pak green #01411c + gold #fbbf24.
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --pak-green: #01411c;
  --pak-green-2: #1a5c33;
  --pak-green-3: #0f3d23;
  --gold: #fbbf24;
  --gold-2: #fcd34d;
  --gold-3: #d97706;
  --ink: #0f172a;
  --muted: #5b6b73;
  --surface: #ffffff;
  --surface-2: #f6f8f4;
  --line: #e3e8e1;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -12px rgba(1, 65, 28, 0.18);
  --shadow-lg: 0 28px 60px -22px rgba(1, 65, 28, 0.32);
  --maxw: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Inter', 'Outfit', -apple-system, system-ui, sans-serif;
  --font-urdu: 'Noto Nastaliq Urdu', 'Noto Sans', serif;
}

/* ── Base page scaffolding (for pages that use design-system blocks) ── */
body { font-family: var(--font); color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; }
.ais-main { display: block; }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 1.25rem; }
.container { max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--pak-green-2); background: rgba(1, 65, 28, .07);
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.section-title .accent { color: var(--gold-3); }
.section-lead { color: var(--muted); font-size: 1.05rem; max-width: 60ch; margin: .85rem auto 0; }

/* ── Buttons ── */
.btn {
  --b: var(--pak-green); --bt: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: .98rem; line-height: 1; text-decoration: none;
  padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .6rem 1rem; font-size: .88rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #4a2e00; box-shadow: 0 12px 26px -12px rgba(217, 119, 6, .7); }
.btn-primary:hover { box-shadow: 0 18px 34px -12px rgba(217, 119, 6, .8); }
.btn-green { background: linear-gradient(135deg, var(--pak-green), var(--pak-green-2)); color: #fff; box-shadow: var(--shadow); }
.btn-green:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.btn-outline { background: transparent; color: var(--pak-green); border-color: var(--pak-green); }
.btn-outline:hover { background: rgba(1, 65, 28, .06); }
.btn-whatsapp { background: #25d366; color: #053b1a; box-shadow: 0 12px 26px -14px rgba(37, 211, 102, .9); }
.btn-whatsapp:hover { box-shadow: 0 18px 32px -14px rgba(37, 211, 102, .95); }

/* ── Navigation (injected by design-system.js) ── */
.ais-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(1, 65, 28, .92); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .7rem 1.25rem; }
.nav-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.nav-logo-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.nav-logo-text { font-weight: 800; font-size: 1.25rem; }
.lk-ai { color: #fff; } .lk-sb { color: var(--gold); }
.nav-links { display: flex; gap: .35rem; margin-left: 1rem; }
.nav-link {
  color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: .5rem .8rem; border-radius: 10px; transition: background .15s, color .15s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-actions { display: flex; gap: .5rem; margin-left: auto; align-items: center; }
.nav-toggle { display: none; background: transparent; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; padding: .2rem .5rem; }
.nav-mobile {
  display: none; flex-direction: column; gap: .5rem; padding: 1rem 1.25rem 1.5rem;
  background: var(--pak-green); border-top: 1px solid rgba(255, 255, 255, .08);
}
.nav-mobile.open { display: flex; }
.nav-mobile .nav-link { color: #fff; padding: .7rem .6rem; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.nav-mobile .btn { width: 100%; }

/* auth-aware pill */
.nav-user { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255, 255, 255, .1); padding: .3rem .4rem .3rem .6rem; border-radius: 999px; }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #4a2e00; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.nav-username { color: #fff; font-weight: 600; font-size: .88rem; }
.nav-portal-link { color: var(--gold-2); font-weight: 700; text-decoration: none; font-size: .85rem; }
.nav-logout-btn { background: rgba(255, 255, 255, .12); border: 0; color: #fff; font-weight: 700; border-radius: 999px; padding: .4rem .8rem; cursor: pointer; }
.nav-logout-btn:hover { background: rgba(255, 255, 255, .22); }

/* ── Hero ── */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(251, 191, 36, .22), transparent 60%),
              linear-gradient(135deg, var(--pak-green) 0%, var(--pak-green-3) 100%);
  padding: clamp(4rem, 9vw, 7.5rem) 1.25rem clamp(3rem, 6vw, 5rem);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); line-height: 1.05; letter-spacing: -.03em; margin: .4rem 0; font-weight: 800; }
.hero h1 .accent { color: var(--gold); }
.hero p.lead { color: rgba(255, 255, 255, .85); font-size: 1.15rem; max-width: 52ch; margin: 1rem 0 1.6rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 1.4rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-badge { display: flex; flex-direction: column; }
.hero-badge b { font-size: 1.5rem; color: var(--gold); }
.hero-badge span { color: rgba(255, 255, 255, .75); font-size: .85rem; }

/* floating phone/widget mock */
.hero-card {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px; padding: 1.1rem; backdrop-filter: blur(8px); box-shadow: var(--shadow-lg);
  transform: perspective(1000px) rotateY(-8deg) rotateX(3deg);
}
.hero-card .chat-row { display: flex; gap: .6rem; margin: .5rem 0; align-items: flex-end; }
.hero-card .bubble { padding: .6rem .85rem; border-radius: 14px; font-size: .9rem; max-width: 80%; }
.hero-card .b-sent { background: var(--gold); color: #4a2e00; margin-left: auto; border-bottom-right-radius: 4px; }
.hero-card .b-recv { background: rgba(255, 255, 255, .14); color: #fff; border-bottom-left-radius: 4px; }
.hero-card .typing { display: inline-flex; gap: 4px; }
.hero-card .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.hero-card .typing i:nth-child(2) { animation-delay: .2s; } .hero-card .typing i:nth-child(3) { animation-delay: .4s; }

/* ── Cards / grids ── */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(251, 191, 36, .5); }
.card .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: .9rem; }
.ic.green { background: rgba(1, 65, 28, .1); } .ic.gold { background: rgba(251, 191, 36, .16); }
.ic.blue { background: rgba(14, 165, 233, .12); } .ic.pink { background: rgba(236, 72, 153, .12); }
.card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.card p { color: var(--muted); line-height: 1.6; }

/* feature row (alternating) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin: 3rem 0; }
.feature-row.reverse .feature-media { order: 2; }
.feature-media {
  background: linear-gradient(135deg, var(--pak-green), var(--pak-green-3)); border-radius: var(--radius);
  padding: 2rem; color: #fff; box-shadow: var(--shadow-lg); min-height: 260px; display: flex; flex-direction: column; justify-content: center;
}
.feature-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; }
.feature-copy p { color: var(--muted); line-height: 1.7; margin: .8rem 0 1rem; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.feature-list li { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink); }
.feature-list li::before { content: "✓"; color: var(--pak-green-2); font-weight: 800; }

/* ── Testimonials ── */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.testi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
  box-shadow: var(--shadow); position: relative;
}
.testi .stars { color: var(--gold-3); letter-spacing: 2px; }
.testi blockquote { margin: .8rem 0 1rem; line-height: 1.7; color: var(--ink); }
.testi .who { display: flex; align-items: center; gap: .7rem; }
.testi .av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--pak-green), var(--pak-green-2)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.testi .who b { display: block; font-size: .95rem; } .testi .who span { color: var(--muted); font-size: .82rem; }

/* ── Pricing / Beta band ── */
.beta-band { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #4a2e00; border-radius: var(--radius); padding: clamp(2rem, 4vw, 3rem); box-shadow: var(--shadow-lg); }
.beta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 900; }
.beta-band p { max-width: 60ch; margin: .6rem 0 1.4rem; }
.beta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.6rem; }
.price-card { background: rgba(255, 255, 255, .65); border: 1px solid rgba(74, 46, 0, .12); border-radius: var(--radius-sm); padding: 1.4rem; }
.price-card.free { outline: 3px solid rgba(1, 65, 28, .25); }
.price-card h4 { font-size: 1.1rem; font-weight: 800; } .price-card .amt { font-size: 2rem; font-weight: 900; margin: .3rem 0; }
.price-card ul { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .4rem; }
.price-card li::before { content: "✓ "; color: var(--pak-green-2); font-weight: 800; }

/* ── CTA strip ── */
.cta-strip { background: linear-gradient(135deg, var(--pak-green), var(--pak-green-3)); color: #fff; text-align: center; border-radius: var(--radius); padding: clamp(2.5rem, 5vw, 4rem); box-shadow: var(--shadow-lg); }
.cta-strip h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
.cta-strip p { color: rgba(255, 255, 255, .85); max-width: 56ch; margin: .8rem auto 1.6rem; }
.cta-strip .hero-cta { justify-content: center; }

/* ── Footer ── */
.ais-footer { background: var(--pak-green); color: rgba(255, 255, 255, .85); padding: 3.5rem 1.25rem 1.5rem; margin-top: 2rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 2fr; gap: 2.5rem; }
.footer-brand .nav-logo-text { font-size: 1.3rem; } .footer-tag { margin: 1rem 0 1.2rem; line-height: 1.7; max-width: 42ch; color: rgba(255, 255, 255, .75); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.footer-col a { display: block; color: rgba(255, 255, 255, .72); text-decoration: none; padding: .3rem 0; font-size: .9rem; transition: color .15s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: var(--maxw); margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: rgba(255, 255, 255, .6); }
.footer-status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #34d399; margin-right: 6px; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }

/* ── Login modal + Ask FAB (injected) ── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 20, 10, .6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; }
.modal-backdrop.open { display: flex; animation: fade .2s var(--ease); }
.modal-box { background: var(--surface); width: min(420px, 100%); border-radius: var(--radius); padding: 2rem; position: relative; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); }
.modal-close { position: absolute; top: .8rem; right: 1rem; background: transparent; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--muted); }
.modal-logo { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; } .modal-logo-icon { font-size: 1.8rem; }
.modal-logo .nav-logo-text { font-size: 1.3rem; }
.modal-box h3 { font-weight: 800; margin-bottom: 1rem; text-align: center; }
.modal-field { margin-bottom: 1rem; } .modal-field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: var(--ink); }
.modal-field input { width: 100%; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.modal-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(251, 191, 36, .18); }
.modal-submit { width: 100%; margin-top: .4rem; }
.modal-error { display: none; background: #fee2e2; color: #b91c1c; padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; margin-bottom: .9rem; }
.modal-error.show { display: block; }
.modal-alt { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .85rem; }
.modal-alt a { color: var(--gold-3); text-decoration: none; font-weight: 600; }
.btn-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.shake { animation: shake .4s; }

.babot-fab { position: fixed; right: 1.4rem; bottom: 1.4rem; width: 60px; height: 60px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #4a2e00; font-size: 1.7rem; cursor: pointer; box-shadow: 0 16px 30px -10px rgba(217, 119, 6, .8); z-index: 1500; transition: transform .2s var(--ease); }
.babot-fab:hover { transform: scale(1.08) rotate(6deg); }
.ask-modal { position: fixed; inset: 0; background: rgba(2, 20, 10, .55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; }
.ask-modal.show { display: flex; animation: fade .2s var(--ease); }
.ask-box { background: var(--surface); width: min(480px, 100%); border-radius: var(--radius); padding: 1.5rem; position: relative; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); }
.ask-head { display: flex; gap: .7rem; align-items: center; margin-bottom: 1rem; } .ask-spark { font-size: 1.8rem; }
.ask-head h3 { margin: 0; font-weight: 800; } .ask-head p { margin: 0; color: var(--muted); font-size: .85rem; }
.ask-filters { display: flex; gap: .6rem; margin-bottom: .8rem; }
.ask-filters select { flex: 1; padding: .6rem; border-radius: 10px; border: 1.5px solid var(--line); font-size: .95rem; }
.ask-answer-card { background: var(--pak-green); color: #fff; border-radius: 12px; padding: 1rem; min-height: 90px; max-height: 220px; overflow: auto; margin-bottom: .8rem; line-height: 1.6; font-size: .95rem; }
.ask-answer-body .ask-think, .ask-answer-body .ask-warn { color: rgba(255, 255, 255, .8); }
.ask-input-row { display: flex; gap: .6rem; }
.ask-input-row textarea { flex: 1; resize: none; padding: .7rem .9rem; border-radius: 12px; border: 1.5px solid var(--line); font-family: var(--font); }

/* ── 404 ── */
.err-wrap { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.err-code { font-size: clamp(5rem, 18vw, 11rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--pak-green), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-wrap h1 { font-size: 1.8rem; margin: .5rem 0; }
.err-wrap p { color: var(--muted); margin-bottom: 1.5rem; }

/* ── Animations ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner, .feature-row, .feature-row.reverse .feature-media, .grid-3, .testi-grid, .beta-grid, .footer-inner { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-media { order: 0; }
  .footer-inner { gap: 2rem; } .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; }
  .hero-card { transform: none; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .grid-2, .footer-cols { grid-template-columns: 1fr; }
  .hero-cta, .cta-strip .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn, .cta-strip .hero-cta .btn { width: 100%; }
}

/* ── Accessibility: reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
