/*
 * dukaanmaster.com — site styles.
 *
 * Built on Bootstrap 5.3 colour modes: <html data-bs-theme="light|dark"> (set by the
 * small inline script in layouts/web.blade.php) switches every token below.
 *
 * Brand: indigo #4F46E5 → violet #7C3AED, cyan #06B6D4 accent, near-black #0B1020.
 * Motion is calm on purpose: slow background blobs, one-time reveal on scroll,
 * count-up numbers, a hover shine. Everything stops under prefers-reduced-motion.
 */

:root,
[data-bs-theme="light"] {
    --dm-indigo: #4f46e5;
    --dm-violet: #7c3aed;
    --dm-cyan: #06b6d4;
    --dm-brand: #4f46e5;               /* links, icons */
    --dm-brand-strong: #4338ca;
    --dm-brand-soft: #eef2ff;
    --dm-accent: #0891b2;              /* numbers */
    --dm-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --dm-gradient-text: linear-gradient(90deg, #4f46e5 0%, #7c3aed 55%, #06b6d4 100%);
    --dm-bg: #ffffff;
    --dm-bg-alt: #f8fafc;
    --dm-card: #ffffff;
    --dm-card-glass: rgba(255, 255, 255, 0.72);
    --dm-border: #e5e7eb;
    --dm-text: #0f172a;
    --dm-muted: #64748b;
    --dm-dot: rgba(15, 23, 42, 0.07);
    --dm-blob-1: rgba(79, 70, 229, 0.20);
    --dm-blob-2: rgba(124, 58, 237, 0.16);
    --dm-blob-3: rgba(6, 182, 212, 0.14);
    --dm-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
    --dm-shadow-lg: 0 30px 70px rgba(49, 46, 129, 0.16);
    --dm-navbar: rgba(255, 255, 255, 0.72);
}

[data-bs-theme="dark"] {
    --dm-brand: #818cf8;
    --dm-brand-strong: #a5b4fc;
    --dm-brand-soft: rgba(129, 140, 248, 0.12);
    --dm-accent: #22d3ee;
    --dm-gradient-text: linear-gradient(90deg, #a5b4fc 0%, #c4b5fd 55%, #67e8f9 100%);
    --dm-bg: #0b1020;
    --dm-bg-alt: #0f1529;
    --dm-card: #121a31;
    --dm-card-glass: rgba(18, 26, 49, 0.72);
    --dm-border: #1f2a44;
    --dm-text: #e5e7eb;
    --dm-muted: #94a3b8;
    --dm-dot: rgba(255, 255, 255, 0.05);
    --dm-blob-1: rgba(79, 70, 229, 0.30);
    --dm-blob-2: rgba(124, 58, 237, 0.24);
    --dm-blob-3: rgba(6, 182, 212, 0.16);
    --dm-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --dm-shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.55);
    --dm-navbar: rgba(11, 16, 32, 0.72);
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--dm-bg);
    color: var(--dm-text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

main, .dm-footer { position: relative; z-index: 1; }

h1, h2, h3, h4, h5, h6 { color: var(--dm-text); letter-spacing: -0.02em; }

.urdu { font-family: 'Noto Nastaliq Urdu', serif; direction: rtl; line-height: 2.2; }
.text-muted-dm { color: var(--dm-muted) !important; }
.text-brand { color: var(--dm-brand) !important; }
.text-accent { color: var(--dm-accent) !important; }
.text-gradient {
    background: var(--dm-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.bg-alt { background: var(--dm-bg-alt); }

/* ---------- Moving background (fixed, behind everything) ---------- */
.dm-bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.dm-bg-layer::before {                         /* faint dot grid, fading downwards */
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--dm-dot) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
.dm-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    will-change: transform;
}
.dm-blob.one   { width: 520px; height: 520px; background: var(--dm-blob-1); top: -160px; left: -120px; animation: dm-drift-1 32s ease-in-out infinite alternate; }
.dm-blob.two   { width: 460px; height: 460px; background: var(--dm-blob-2); top: 80px; right: -140px; animation: dm-drift-2 38s ease-in-out infinite alternate; }
.dm-blob.three { width: 380px; height: 380px; background: var(--dm-blob-3); top: 520px; left: 35%; animation: dm-drift-3 44s ease-in-out infinite alternate; }

@keyframes dm-drift-1 { to { transform: translate(140px, 90px) scale(1.12); } }
@keyframes dm-drift-2 { to { transform: translate(-120px, 140px) scale(0.9); } }
@keyframes dm-drift-3 { to { transform: translate(-160px, -80px) scale(1.15); } }

/* ---------- Reveal on scroll (added by script.js, runs once) ---------- */
.dm-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.dm-reveal.is-visible { opacity: 1; transform: none; }
.dm-reveal[data-delay="1"] { transition-delay: 0.08s; }
.dm-reveal[data-delay="2"] { transition-delay: 0.16s; }
.dm-reveal[data-delay="3"] { transition-delay: 0.24s; }
.no-js .dm-reveal { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn-dm {
    position: relative;
    overflow: hidden;
    background: var(--dm-gradient);
    border: 0;
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.30);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-dm::after {                               /* light shine sweeping across on hover */
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
}
.btn-dm:hover::after { animation: dm-shine 0.8s ease; }
@keyframes dm-shine { to { left: 130%; } }
.btn-dm:hover, .btn-dm:focus { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 32px rgba(79, 70, 229, 0.40); }
.btn-dm-outline {
    border: 1px solid var(--dm-border);
    color: var(--dm-text);
    background: var(--dm-card-glass);
    backdrop-filter: blur(8px);
    font-weight: 600;
    border-radius: 12px;
}
.btn-dm-outline:hover { border-color: var(--dm-brand); color: var(--dm-brand); background: var(--dm-card); }

/* ---------- Navbar ---------- */
.dm-navbar {
    background: var(--dm-navbar);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--dm-border);
    padding: 0.7rem 0;
    z-index: 1030;
}
.dm-navbar .navbar-brand img { height: 36px; width: auto; }
.dm-navbar .nav-link { color: var(--dm-muted); font-weight: 500; font-size: 0.95rem; }
.dm-navbar .nav-link:hover, .dm-navbar .nav-link.active { color: var(--dm-text); }
.dm-logo-dark { display: none; }
[data-bs-theme="dark"] .dm-logo-light { display: none; }
[data-bs-theme="dark"] .dm-logo-dark { display: inline-block; }

.dm-theme-switch { background: var(--dm-bg-alt); border: 1px solid var(--dm-border); border-radius: 10px; padding: 3px; }
.dm-theme-switch .btn { border: 0; color: var(--dm-muted); background: transparent; padding: 0.3rem 0.55rem; line-height: 1; border-radius: 7px !important; }
.dm-theme-switch .btn.active { background: var(--dm-card); color: var(--dm-brand); box-shadow: var(--dm-shadow); }

/* ---------- Hero ---------- */
.dm-hero { padding: 96px 0 64px; }
.dm-hero h1 { font-weight: 800; letter-spacing: -0.04em; font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.06; }
.dm-hero .lead { color: var(--dm-muted); font-size: 1.15rem; }
.dm-badge {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: var(--dm-card-glass);
    backdrop-filter: blur(8px);
    color: var(--dm-text);
    border: 1px solid var(--dm-border);
    border-radius: 50rem;
    padding: 0.32rem 0.9rem 0.32rem 0.4rem;
    font-size: 0.82rem; font-weight: 600;
}
.dm-badge .pill { background: var(--dm-gradient); color: #fff; border-radius: 50rem; padding: 0.1rem 0.55rem; font-size: 0.72rem; }

/* App-screen preview in a browser frame */
.dm-app {
    position: relative;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: 18px;
    box-shadow: var(--dm-shadow-lg);
    overflow: hidden;
    animation: dm-float 9s ease-in-out infinite;
}
@keyframes dm-float { 50% { transform: translateY(-8px); } }
.dm-app-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--dm-bg-alt); border-bottom: 1px solid var(--dm-border); }
.dm-app-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dm-border); }
.dm-app-bar .title { margin-left: 8px; font-size: 0.75rem; color: var(--dm-muted); font-weight: 600; }
.dm-app-grid { display: grid; grid-template-columns: 56px 1fr; min-height: 330px; }
.dm-app-side { border-right: 1px solid var(--dm-border); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--dm-bg-alt); }
.dm-app-side i { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--dm-muted); font-size: 0.9rem; }
.dm-app-side i.on { background: var(--dm-gradient); color: #fff; }
.dm-app-main { padding: 16px; }
.dm-kpi { border: 1px solid var(--dm-border); border-radius: 12px; padding: 0.65rem 0.8rem; background: var(--dm-card); }
.dm-kpi .label { font-size: 0.72rem; color: var(--dm-muted); }
.dm-kpi .num { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.dm-chart { border: 1px solid var(--dm-border); border-radius: 12px; padding: 0.7rem 0.8rem 0.3rem; margin-top: 10px; }
.dm-chart svg { width: 100%; height: 88px; display: block; }
.dm-chart .line { fill: none; stroke: url(#dmChartStroke); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; }
.dm-chart.is-visible .line { animation: dm-draw 2s ease forwards 0.3s; }
@keyframes dm-draw { to { stroke-dashoffset: 0; } }
.dm-list { margin-top: 10px; font-size: 0.8rem; }
.dm-list .row-item { display: flex; align-items: center; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1px dashed var(--dm-border); }
.dm-list .row-item:last-child { border-bottom: 0; }
.dm-chip { font-size: 0.68rem; font-weight: 700; border-radius: 50rem; padding: 0.1rem 0.5rem; }
.dm-chip.paid { background: rgba(6, 182, 212, 0.14); color: var(--dm-accent); }
.dm-chip.due  { background: rgba(124, 58, 237, 0.14); color: var(--dm-violet); }
.dm-chip.late { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

/* ---------- Stats band ---------- */
.dm-stats { padding: 28px 0; }
.dm-stats .box {
    background: var(--dm-card-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--dm-border);
    border-radius: 20px;
    padding: 1.6rem 1rem;
}
.dm-stats .num { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; }
.dm-stats .label { color: var(--dm-muted); font-size: 0.92rem; }

/* ---------- Sections ---------- */
.dm-section { padding: 92px 0; }
.dm-eyebrow { display: inline-block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.dm-section-title { font-weight: 800; letter-spacing: -0.035em; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.dm-card {
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: 18px;
    box-shadow: var(--dm-shadow);
    padding: 1.6rem;
    height: 100%;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.dm-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--dm-brand) 40%, var(--dm-border)); }
.dm-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--dm-brand-soft); color: var(--dm-brand); font-size: 1.15rem;
}

/* ---------- Feature tabs ---------- */
.dm-tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; background: var(--dm-bg-alt); border: 1px solid var(--dm-border); border-radius: 14px; padding: 5px; }
.dm-tabs .nav-link { border-radius: 10px; color: var(--dm-muted); font-weight: 600; font-size: 0.92rem; padding: 0.5rem 1rem; }
.dm-tabs .nav-link.active { background: var(--dm-gradient); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3); }
.dm-tab-pane { animation: dm-fade 0.45s ease; }
@keyframes dm-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dm-tab-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.dm-tab-list li { display: flex; gap: 0.7rem; padding: 0.45rem 0; }
.dm-tab-list i { color: var(--dm-brand); margin-top: 0.3rem; }
.dm-mini {                                     /* small mock screen per tab */
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: 16px;
    box-shadow: var(--dm-shadow-lg);
    padding: 1.1rem;
    font-size: 0.85rem;
}
.dm-mini .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; font-weight: 700; }
.dm-mini .line-item { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dashed var(--dm-border); }
.dm-mini .line-item:last-child { border-bottom: 0; }
.dm-progress { height: 8px; border-radius: 8px; background: var(--dm-bg-alt); overflow: hidden; }
.dm-progress span { display: block; height: 100%; border-radius: 8px; background: var(--dm-gradient); }

/* ---------- Timeline ("How it works") ---------- */
.dm-timeline { position: relative; max-width: 760px; margin: 0 auto; }
.dm-timeline::before, .dm-timeline .fill {
    content: '';
    position: absolute;
    left: 23px; top: 8px; bottom: 8px;
    width: 2px;
    background: var(--dm-border);
}
.dm-timeline .fill { background: var(--dm-gradient); bottom: auto; height: 0; transition: height 0.2s linear; }
.dm-step { position: relative; display: flex; gap: 1.2rem; padding: 0 0 2.4rem; }
.dm-step:last-child { padding-bottom: 0; }
.dm-step .num {
    position: relative; z-index: 1; flex: 0 0 48px;
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--dm-card); border: 1px solid var(--dm-border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: var(--dm-brand);
    transition: background 0.3s ease, color 0.3s ease;
}
.dm-step.is-visible .num { background: var(--dm-gradient); color: #fff; border-color: transparent; }

/* ---------- Clients ---------- */
.dm-client { text-align: center; }
.dm-client .initials {
    width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 0.75rem;
    background: var(--dm-brand-soft); color: var(--dm-brand);
    display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.dm-client a { color: var(--dm-brand); text-decoration: none; font-size: 0.85rem; font-weight: 600; }

/* ---------- Pricing ---------- */
.dm-billing-toggle { display: inline-flex; background: var(--dm-bg-alt); border: 1px solid var(--dm-border); border-radius: 12px; padding: 4px; }
.dm-billing-toggle button { border: 0; background: transparent; color: var(--dm-muted); border-radius: 9px; padding: 0.45rem 1.2rem; font-weight: 600; }
.dm-billing-toggle button.active { background: var(--dm-card); color: var(--dm-text); box-shadow: var(--dm-shadow); }
.dm-save { display: inline-block; color: var(--dm-brand); background: var(--dm-brand-soft); border-radius: 50rem; padding: 0.15rem 0.7rem; font-weight: 600; font-size: 0.82rem; }
.dm-plan { position: relative; display: flex; flex-direction: column; }
.dm-plan.popular {
    border: 2px solid transparent;
    background: linear-gradient(var(--dm-card), var(--dm-card)) padding-box, var(--dm-gradient) border-box;
    box-shadow: var(--dm-shadow-lg);
}
.dm-plan .ribbon {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--dm-gradient); color: #fff;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    border-radius: 50rem; padding: 0.25rem 0.85rem; white-space: nowrap;
}
.dm-plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.dm-plan .price small { font-size: 0.9rem; font-weight: 500; color: var(--dm-muted); letter-spacing: 0; }
.dm-plan ul { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; flex-grow: 1; }
.dm-plan li { padding: 0.35rem 0; font-size: 0.94rem; }
.dm-plan li i { width: 20px; }
.dm-plan li.no { color: var(--dm-muted); opacity: 0.7; }
.dm-limit { background: var(--dm-bg-alt); border: 1px solid var(--dm-border); border-radius: 12px; padding: 0.75rem 0.9rem; font-size: 0.9rem; }
.dm-limit strong { color: var(--dm-brand); }

/* ---------- FAQ ---------- */
.dm-faq .accordion-item { background: var(--dm-card); border: 1px solid var(--dm-border); border-radius: 14px !important; margin-bottom: 0.7rem; overflow: hidden; }
.dm-faq .accordion-button { background: var(--dm-card); color: var(--dm-text); font-weight: 600; box-shadow: none; }
.dm-faq .accordion-button:not(.collapsed) { color: var(--dm-brand); }
.dm-faq .accordion-button:focus { box-shadow: none; }
.dm-faq .accordion-body { color: var(--dm-muted); padding-top: 0; }

/* ---------- Contact ---------- */
.dm-contact {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #7c3aed 100%);
    background-size: 200% 200%;
    animation: dm-gradient-shift 14s ease infinite;
    color: #fff; border-radius: 24px; padding: 3.5rem 2rem;
}
@keyframes dm-gradient-shift { 50% { background-position: 100% 50%; } }
.dm-contact::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 22px 22px;
}
.dm-contact > * { position: relative; }
.dm-contact h2 { color: #fff; }
.dm-contact .btn-light { font-weight: 700; color: #312e81; border-radius: 12px; }
.dm-contact .btn-outline-light { border-radius: 12px; }

/* ---------- Page header (about / legal) ---------- */
.dm-page-header { padding: 88px 0 56px; border-bottom: 1px solid var(--dm-border); }
.dm-legal { background: var(--dm-card); border: 1px solid var(--dm-border); border-radius: 18px; padding: 2.5rem; box-shadow: var(--dm-shadow); }
.dm-legal h4 { font-weight: 700; font-size: 1.15rem; margin-top: 2rem; }
.dm-legal h4:first-of-type { margin-top: 0; }
.dm-legal p, .dm-legal li { color: var(--dm-muted); }

/* ---------- Footer ---------- */
.dm-footer { background: #070b16; color: #94a3b8; padding: 64px 0 28px; }
.dm-footer h6 { color: #fff; font-weight: 600; margin-bottom: 1rem; font-size: 0.95rem; }
.dm-footer a { color: #94a3b8; text-decoration: none; display: block; margin-bottom: 0.5rem; font-size: 0.93rem; }
.dm-footer a:hover { color: #a5b4fc; }
.dm-footer hr { border-color: #1f2a44; opacity: 1; }

.dm-whatsapp {
    position: fixed; right: 20px; bottom: 20px; z-index: 1050;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: #fff; font-size: 1.8rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    text-decoration: none; transition: transform 0.15s ease;
}
.dm-whatsapp:hover { color: #fff; transform: scale(1.06); }

@media (max-width: 991.98px) {
    .dm-hero { padding: 64px 0 40px; }
    .dm-section { padding: 64px 0; }
    .dm-blob { filter: blur(50px); opacity: 0.8; }
}

/* Visitors who asked their device for less motion get a still page. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .dm-reveal { opacity: 1; transform: none; }
    .dm-chart .line { stroke-dashoffset: 0; }
}
