/* ══════════════════════════════════════════════════════════════
   APIsewa — Marketing Landing Page
   Dark-mode B2B SaaS aesthetic. Alive, interactive, premium.
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;600;700;800&display=swap');

:root {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-dark: #e2e8f0;
    --border-glow: rgba(37, 99, 235, 0.3);

    --brand-blue: #1e40af;
    --brand-blue-light: #2563eb;
    --brand-amber: #f59e0b;
    --brand-green: #10b981;
    --brand-purple: #8b5cf6;

    --text-white: #0f172a;
    --text-gray: #475569;
    --text-muted: #64748b;

    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.landing {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a { color: var(--brand-blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ─────────────────────────────────────── */
.landing-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 0 48px; height: 72px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-dark);
}
.landing-nav .logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 700;
    color: var(--text-white); text-decoration: none;
}
.landing-nav .logo svg { width: 28px; height: 28px; stroke: var(--brand-amber); }
.landing-nav .nav-links { display: flex; align-items: center; gap: 32px; }
.landing-nav .nav-links a {
    color: var(--text-gray); font-size: 14px; font-weight: 500;
    text-decoration: none; transition: color 0.2s;
}
.landing-nav .nav-links a:hover { color: var(--brand-blue-light); text-decoration: none; }
.landing-nav .nav-links a.nav-cta {
    padding: 10px 24px; border-radius: 8px;
    background: var(--brand-blue-light); color: #fff;
    font-weight: 600; font-size: 14px; text-decoration: none;
    transition: all 0.2s;
    border: none;
}
.landing-nav .nav-links a.nav-cta:hover { background: var(--brand-blue); color: #fff; text-decoration: none; transform: translateY(-1px); }

/* ── Hero Section ───────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 48px 80px;
    overflow: hidden;
}
.hero-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.4;
}
.hero-gradient {
    position: absolute; top: -200px; right: -200px;
    width: 800px; height: 800px; border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    z-index: 0; pointer-events: none;
}
.hero-content {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
    max-width: 1400px; margin: 0 auto; width: 100%;
    align-items: center;
}
.hero-text { max-width: 600px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 100px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-size: 13px; font-weight: 600; color: var(--brand-amber);
    margin-bottom: 24px; text-transform: uppercase; letter-spacing: 0.5px;
}
.hero-badge svg { width: 14px; height: 14px; fill: var(--brand-amber); }
.hero-title {
    font-size: 56px; font-weight: 800; letter-spacing: -1.5px;
    margin-bottom: 24px; line-height: 1.1;
}
.hero-title .highlight { color: var(--brand-blue-light); }
.hero-subtitle {
    font-size: 17px; color: var(--text-gray); line-height: 1.7;
    margin-bottom: 40px; max-width: 520px;
}
.hero-checks {
    display: flex; flex-wrap: wrap; gap: 20px;
    margin-bottom: 40px;
}
.hero-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 500; color: var(--text-gray);
}
.hero-check svg { width: 18px; height: 18px; stroke: var(--brand-green); flex-shrink: 0; }
.hero-buttons { display: flex; gap: 16px; }
.btn-hero {
    padding: 14px 28px; border-radius: 10px;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 15px;
    cursor: pointer; transition: all 0.25s; border: none; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero:hover { text-decoration: none; }
.btn-hero-primary { background: var(--brand-blue); color: #fff; }
.btn-hero-primary:hover { background: var(--brand-blue-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3); }
.btn-hero-secondary { background: #fff; color: var(--text-white); border: 1px solid var(--border-dark); }
.btn-hero-secondary:hover { background: #f8fafc; transform: translateY(-2px); border-color: var(--brand-blue-light); }
.btn-hero-secondary svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Hero Floating Cards ────────────────────────── */
.hero-visual { position: relative; height: 520px; width: 600px; margin: 0 auto; }

.float-card {
    position: absolute; border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border-dark);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    padding: 20px; backdrop-filter: blur(12px);
    transition: transform 0.4s ease, box-shadow 0.3s ease;
}
.float-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.float-dashboard {
    top: 20px; left: 0; width: 420px;
    animation: floatSlow 6s ease-in-out infinite;
    z-index: 1;
}
.float-qr {
    bottom: 60px; left: 30px; width: 180px;
    animation: floatMedium 5s ease-in-out infinite;
    z-index: 3;
    background: rgba(17, 24, 39, 0.95);
}
.float-payment {
    top: 80px; right: 0; width: 220px;
    animation: floatFast 4s ease-in-out infinite;
    z-index: 3;
}
.float-chat {
    bottom: 20px; right: 20px; width: 280px;
    animation: floatSlow 7s ease-in-out infinite reverse;
    z-index: 2;
}

/* Float card inner elements */
.fc-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 14px; font-size: 12px; font-weight: 600;
    color: var(--text-gray); text-transform: uppercase; letter-spacing: 0.5px;
}
.fc-dot { width: 8px; height: 8px; border-radius: 50%; }
.fc-dot.green { background: var(--brand-green); }
.fc-dot.blue { background: var(--brand-blue); }
.fc-dot.amber { background: var(--brand-amber); }
.fc-dot.purple { background: var(--brand-purple); }

.fc-stat-row {
    display: flex; gap: 16px; margin-bottom: 12px;
}
.fc-stat {
    flex: 1; padding: 10px 12px;
    background: rgba(255,255,255,0.03); border-radius: 8px;
    border: 1px solid var(--border-dark);
}
.fc-stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.fc-stat-value { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 700; color: #fff; }

.fc-bar-row { display: flex; gap: 4px; height: 32px; align-items: flex-end; }
.fc-bar {
    flex: 1; border-radius: 4px 4px 0 0;
    background: var(--brand-blue); opacity: 0.7;
    animation: barPulse 3s ease-in-out infinite;
}
.fc-bar:nth-child(2) { animation-delay: 0.3s; }
.fc-bar:nth-child(3) { animation-delay: 0.6s; }
.fc-bar:nth-child(4) { animation-delay: 0.9s; }
.fc-bar:nth-child(5) { animation-delay: 1.2s; }
.fc-bar:nth-child(6) { animation-delay: 1.5s; }

/* QR Card */
.fc-qr-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px;
    width: 80px; height: 80px; margin: 0 auto 12px;
}
.fc-qr-cell {
    border-radius: 2px;
    animation: qrFlicker 4s ease-in-out infinite;
}
.fc-qr-cell.dark { background: #fff; }
.fc-qr-cell.light { background: rgba(255,255,255,0.1); }
.fc-qr-text { text-align: center; font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* Payment card */
.fc-payment-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(16, 185, 129, 0.15); color: var(--brand-green);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.fc-payment-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.fc-payment-amount { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.fc-payment-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 100px;
    background: rgba(16, 185, 129, 0.12); color: var(--brand-green);
    font-size: 12px; font-weight: 600;
}

/* Chat card */
.fc-chat-msg {
    padding: 10px 14px; border-radius: 12px; margin-bottom: 10px;
    font-size: 13px; line-height: 1.5; max-width: 85%;
}
.fc-chat-msg.user {
    background: var(--brand-blue); color: #fff; margin-left: auto;
    border-bottom-right-radius: 4px;
}
.fc-chat-msg.bot {
    background: rgba(255,255,255,0.06); color: var(--text-gray);
    border-bottom-left-radius: 4px;
}
.fc-chat-msg.bot .bot-name { font-size: 10px; color: var(--brand-amber); font-weight: 600; margin-bottom: 4px; display: block; }

/* ── Keyframes ──────────────────────────────────── */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes floatMedium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes floatFast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}
@keyframes barPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
@keyframes qrFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes terminalType {
    from { width: 0; }
    to { width: 100%; }
}

/* ── Services Section ───────────────────────────── */
.services-section {
    padding: 120px 48px;
    max-width: 1400px; margin: 0 auto;
}
.section-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 100px;
    background: rgba(37, 99, 235, 0.1); border: 1px solid rgba(37, 99, 235, 0.2);
    font-size: 12px; font-weight: 600; color: var(--brand-blue-light);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px;
}
.section-title {
    font-size: 40px; font-weight: 800; letter-spacing: -1px;
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 17px; color: var(--text-gray); max-width: 600px;
    margin-bottom: 64px; line-height: 1.7;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    position: relative; padding: 40px;
    background: var(--bg-card); border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--card-accent), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.service-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
}
.service-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }

.service-card h3 { font-size: 22px; margin-bottom: 12px; font-weight: 700; }
.service-card p { color: var(--text-gray); font-size: 15px; line-height: 1.7; margin-bottom: 24px; }

.service-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 8px;
    font-size: 12px; font-weight: 600;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-dark);
    color: var(--text-muted);
}

/* Card accent colors */
.service-card.qr { --card-accent: var(--brand-blue); }
.service-card.qr .service-icon { background: rgba(37, 99, 235, 0.12); color: var(--brand-blue-light); }
.service-card.unipin { --card-accent: var(--brand-amber); }
.service-card.unipin .service-icon { background: rgba(245, 158, 11, 0.12); color: var(--brand-amber); }
.service-card.bdgames { --card-accent: var(--brand-purple); }
.service-card.bdgames .service-icon { background: rgba(139, 92, 246, 0.12); color: var(--brand-purple); }
.service-card.facebook { --card-accent: var(--brand-green); }
.service-card.facebook .service-icon { background: rgba(16, 185, 129, 0.12); color: var(--brand-green); }

/* ── Code Terminal ──────────────────────────────── */
.terminal {
    margin-top: 24px;
    background: #0c1222; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden; font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 13px;
}
.terminal-header {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px; background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }
.terminal-body { padding: 16px; line-height: 1.8; color: var(--text-gray); }
.terminal-body .keyword { color: #c084fc; }
.terminal-body .string { color: #34d399; }
.terminal-body .comment { color: #475569; }
.terminal-body .url { color: #60a5fa; }
.terminal-body .prop { color: #93c5fd; }
.terminal-body .val { color: #fbbf24; }
.terminal-cursor {
    display: inline-block; width: 8px; height: 16px;
    background: var(--brand-blue-light); margin-left: 2px;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── How It Works ───────────────────────────────── */
.how-section {
    padding: 120px 48px;
    max-width: 1400px; margin: 0 auto;
}
.steps-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
    margin-top: 64px;
}
.step-card {
    text-align: center; padding: 40px 32px;
    background: var(--bg-card); border: 1px solid var(--border-dark);
    border-radius: var(--radius-xl);
    transition: transform 0.3s, border-color 0.3s;
}
.step-card:hover { transform: translateY(-4px); border-color: var(--border-glow); }
.step-number {
    width: 48px; height: 48px; border-radius: 14px;
    background: rgba(37, 99, 235, 0.12); color: var(--brand-blue-light);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 700;
    margin-bottom: 20px;
}
.step-card h3 { font-size: 18px; margin-bottom: 12px; }
.step-card p { color: var(--text-gray); font-size: 14px; line-height: 1.7; }

/* ── Footer ─────────────────────────────────────── */
.landing-footer {
    padding: 48px; border-top: 1px solid var(--border-dark);
    text-align: center; color: var(--text-muted); font-size: 14px;
}
.landing-footer a { color: var(--text-gray); }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; gap: 64px; justify-items: center; text-align: center; }
    .hero-text { display: flex; flex-direction: column; align-items: center; max-width: 680px; }
    .hero-checks { justify-content: center; }
    .hero-title { font-size: 48px; }
    .services-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    
    .hero-visual { transform: scale(0.85); transform-origin: top center; margin-bottom: -50px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 40px; }
    .hero { padding: 120px 24px 60px; }
    
    /* On mobile, stack the cards neatly instead of rigidly scaling a fixed box */
    .hero-visual { 
        transform: none; 
        margin-bottom: 0;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .float-card {
        position: relative !important;
        top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
        width: 100% !important;
        max-width: 380px;
        animation: none !important;
        transform: none !important;
    }
    .float-qr, .float-payment { display: none !important; } /* Hide clutter on small screens */
}

@media (max-width: 640px) {
    .landing-nav { padding: 0 20px; }
    .landing-nav .nav-links a:not(.nav-cta) { display: none; }
    .hero { padding: 100px 20px 40px; }
    .hero-title { font-size: 32px; }
    .hero-subtitle { font-size: 15px; margin-bottom: 32px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn-hero { width: 100%; justify-content: center; }
    
    .services-section, .how-section { padding: 80px 20px; }
    .section-title { font-size: 28px; }
    .landing-footer { padding: 32px 20px; }
}
