/* McBeth Enhancements — theme, UI, sections */

:root {
    --bg-primary: #0a0b14;
    --bg-gradient: linear-gradient(to right, #0a0b14 0%, #151538 35%, #2a2a8a 65%, #3b3bb3 100%);
    --text-primary: #ffffff;
    --text-muted: #9ca3af;
    --card-bg: rgba(255,255,255,0.03);
    --card-border: rgba(255,255,255,0.1);
    --cyan: #22D3EE;
}

body.light-mode {
    --bg-primary: #f0f4f8;
    --bg-gradient: linear-gradient(to right, #e8ecf4 0%, #dce4f0 35%, #c8d4e8 65%, #b8c8e0 100%);
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --card-bg: rgba(255,255,255,0.85);
    --card-border: rgba(15,23,42,0.1);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle, rgba(15,23,42,0.04) 1px, transparent 1px), var(--bg-gradient);
}

body.light-mode .glass-nav { background: rgba(255,255,255,0.9); border-color: rgba(15,23,42,0.08); }
body.light-mode .text-gray-400, body.light-mode .text-gray-500, body.light-mode .text-gray-600 { color: var(--text-muted) !important; }
body.light-mode .screenshot-card, body.light-mode .service-card, body.light-mode .testimonial-card,
body.light-mode .why-card, body.light-mode .process-step, body.light-mode .mock-glass {
    background: var(--card-bg); border-color: var(--card-border);
}
body.light-mode h1, body.light-mode h2, body.light-mode h3, body.light-mode h4 { color: #0f172a; }
body.light-mode .gradient-text { background: linear-gradient(135deg, #0891b2, #6366f1); -webkit-background-clip: text; background-clip: text; }

.font-display { font-family: 'Syne', 'Inter', sans-serif; }

h2, h3 { font-family: 'Syne', 'Inter', sans-serif; }

.hero-title {
    font-family: 'Syne', 'Inter', sans-serif;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.9;
    max-width: 100%;
    font-size: clamp(2.25rem, 8vw, 3.25rem);
}

.hero-text-col {
    container-type: inline-size;
    position: relative;
    z-index: 20;
}

.hero-visual-col {
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 10.2cqw, 4.35rem);
    }
}

@media (min-width: 1280px) {
    .hero-title {
        font-size: clamp(2.5rem, 10.5cqw, 5rem);
    }
}

/* Scroll progress */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px;
    background: linear-gradient(90deg, #22D3EE, #6366f1);
    z-index: 9999; width: 0%; transition: width 0.1s linear;
}

/* Nav shrink */
nav.glass-nav { transition: padding 0.3s ease, box-shadow 0.3s ease; }
nav.glass-nav.scrolled { padding-top: 0; padding-bottom: 0; box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
nav.glass-nav.scrolled .nav-inner { padding-top: 0.65rem; padding-bottom: 0.65rem; }
.nav-inner { transition: padding 0.3s ease; }

.logo-spin:hover img { animation: logoSpin 0.6s ease; }
@keyframes logoSpin { 0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(-8deg) scale(1.08); } 100% { transform: rotate(0deg) scale(1); } }

.nav-tools { display: flex; align-items: center; gap: 0.5rem; }
.nav-icon-btn {
    width: 32px; height: 32px; border-radius: 10px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; cursor: pointer; transition: all 0.2s; color: #9ca3af;
}
.nav-icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }
body.light-mode .nav-icon-btn { background: rgba(15,23,42,0.05); border-color: rgba(15,23,42,0.1); }

/* Marquee */
.marquee-wrap {
    overflow: hidden; border-y: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2); padding: 0.85rem 0;
}
.marquee-track {
    display: flex; gap: 3rem; animation: marquee 30s linear infinite; width: max-content;
}
.marquee-track span {
    font-size: 10px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.25em; color: #6b7280; white-space: nowrap;
}
.marquee-track span.highlight { color: var(--cyan); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Comparator */
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; }
.compare-btn {
    padding: 1.25rem 1rem; border-radius: 16px; text-align: center; cursor: pointer;
    background: var(--card-bg); border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}
.compare-btn:hover, .compare-btn.selected {
    border-color: var(--cyan); background: rgba(34,211,238,0.08); transform: translateY(-3px);
}
.compare-btn i { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }
.compare-btn span { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.compare-result {
    margin-top: 1.5rem; padding: 1.5rem; border-radius: 20px;
    background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.2);
    display: none;
}
.compare-result.show { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Estimator */
.estimator-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 24px; padding: 2rem;
}
.estimator-card select, .estimator-card input {
    width: 100%; padding: 0.85rem 1rem; border-radius: 12px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: inherit; font-weight: 600; font-size: 14px; outline: none;
}
.estimator-card select:focus, .estimator-card input:focus { border-color: var(--cyan); }
body.light-mode .estimator-card select, body.light-mode .estimator-card input { background: white; }

/* Device mockup */
.device-frame {
    position: relative; margin: 0 auto;
    background: #1a1a2e; border-radius: 12px 12px 0 0;
    padding: 8px 8px 0; border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.device-frame::before {
    content: ''; display: block; height: 6px; width: 40px;
    background: rgba(255,255,255,0.2); border-radius: 3px; margin: 0 auto 6px;
}
.device-screen {
    overflow: hidden; border-radius: 4px 4px 0 0; height: 16rem; position: relative;
}
.device-screen img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
    transition: transform 8s ease, object-position 8s ease;
}
.screenshot-card:hover .device-screen img,
.device-screen:hover img {
    transform: scale(1.08); object-position: top 20%;
}
.device-base {
    height: 8px; background: linear-gradient(180deg, #2a2a3e, #1a1a2e);
    border-radius: 0 0 4px 4px; margin: 0 20%;
}

.play-badge {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    padding: 4px 10px; border-radius: 999px; font-size: 9px;
    font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--cyan); border: 1px solid rgba(34,211,238,0.3);
    pointer-events: none;
}

/* Case study */
.case-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 20px; overflow: hidden; cursor: pointer; transition: all 0.3s;
}
.case-card:hover { border-color: rgba(34,211,238,0.4); transform: translateY(-4px); }
.case-metric {
    font-size: 2.5rem; font-weight: 900;
    background: linear-gradient(135deg, #22D3EE, #818cf8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.case-modal {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,0.9); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center; padding: 2rem;
}
.case-modal.open { display: flex; }
.case-modal-content {
    background: #0f172a; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px; max-width: 600px; width: 100%; padding: 2.5rem;
    max-height: 85vh; overflow-y: auto;
}

/* Integrations */
.integration-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--card-bg); border: 1px solid var(--card-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; transition: all 0.3s;
}
.integration-icon:hover { border-color: var(--cyan); transform: scale(1.1); color: var(--cyan); }

/* Pricing */
.pricing-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 24px; padding: 2rem; transition: all 0.3s; position: relative;
}
.pricing-card.featured {
    border-color: rgba(34,211,238,0.5);
    box-shadow: 0 0 40px rgba(34,211,238,0.1);
}
.pricing-card.featured::before {
    content: 'POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--cyan); color: #000; font-size: 9px; font-weight: 900;
    padding: 4px 14px; border-radius: 999px; letter-spacing: 0.15em;
}
.price-tag { font-size: 2.5rem; font-weight: 900; font-family: 'Syne', sans-serif; }
.price-tag small { font-size: 14px; font-weight: 400; color: var(--text-muted); }

/* Blog */
.blog-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 20px; overflow: hidden; transition: all 0.3s;
}
.blog-card:hover { border-color: rgba(34,211,238,0.3); transform: translateY(-4px); }
.blog-tag {
    font-size: 9px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--cyan);
}

/* Map */
.map-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    height: 280px;
    background:
        radial-gradient(circle at 30% 40%, rgba(34, 211, 238, 0.12), transparent 50%),
        rgba(255, 255, 255, 0.03);
}
.map-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.map-open-link {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0a0b14;
    background: #22D3EE;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.map-open-link:hover { background: #fff; }

/* Sticky mobile bar */
.sticky-mobile-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: rgba(10,11,20,0.95); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: none; padding: 0.65rem 1rem;
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
}
@media (max-width: 767px) { .sticky-mobile-bar { display: flex; gap: 0.5rem; } .wa-float { bottom: 80px; } }
.sticky-mobile-bar a {
    flex: 1; text-align: center; padding: 0.75rem; border-radius: 12px;
    font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em;
}
.sticky-mobile-bar .btn-explore { background: var(--cyan); color: #000; }
.sticky-mobile-bar .btn-wa-sticky { background: rgba(37,211,102,0.15); color: #25D366; border: 1px solid rgba(37,211,102,0.3); }

/* Chatbot */
.chatbot-toggle {
    position: fixed; bottom: 24px; left: 24px; z-index: 100;
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #22D3EE);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #000; cursor: pointer;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
    transition: transform 0.3s;
}
@media (max-width: 767px) { .chatbot-toggle { bottom: 80px; } }
.chatbot-toggle:hover { transform: scale(1.1); }

.chatbot-panel {
    position: fixed; bottom: 90px; left: 24px; z-index: 100;
    width: 340px; max-width: calc(100vw - 48px);
    background: #0f172a; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: none; flex-direction: column; max-height: 420px;
}
@media (max-width: 767px) { .chatbot-panel { bottom: 140px; } }
.chatbot-panel.open { display: flex; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.chatbot-header {
    padding: 1rem 1.25rem; background: rgba(34,211,238,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 0.75rem;
}
.chatbot-messages {
    flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem;
    min-height: 200px; max-height: 260px;
}
.chat-msg {
    padding: 0.65rem 1rem; border-radius: 14px; font-size: 13px; line-height: 1.5; max-width: 85%;
}
.chat-msg.bot { background: rgba(255,255,255,0.06); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: rgba(34,211,238,0.15); align-self: flex-end; border-bottom-right-radius: 4px; color: var(--cyan); }
.chatbot-options { padding: 0.75rem 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid rgba(255,255,255,0.05); }
.chat-opt {
    padding: 0.4rem 0.75rem; border-radius: 999px; font-size: 11px; font-weight: 700;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer; transition: all 0.2s;
}
.chat-opt:hover { border-color: var(--cyan); color: var(--cyan); }

/* Form validation */
.form-group { position: relative; }
.form-group.error input, .form-group.error textarea, .form-group.error select {
    border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}
.form-error {
    font-size: 11px; color: #ef4444; margin-top: 0.35rem; display: none;
}
.form-group.error .form-error { display: block; }
.form-group.success input, .form-group.success textarea {
    border-color: #22c55e !important;
}
.btn-submit.loading { opacity: 0.7; pointer-events: none; }
.btn-submit.loading::after {
    content: ''; display: inline-block; width: 14px; height: 14px;
    border: 2px solid transparent; border-top-color: #000;
    border-radius: 50%; animation: spin 0.6s linear infinite; margin-left: 8px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Counter animation */
.stat-number { transition: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important; scroll-behavior: auto !important;
    }
    .marquee-track { animation: none; }
}
