:root {
    --bg-dark: #07070a;
    --bg-darker: #040406;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-main: #f0f0f5;
    --text-muted: #9ba1b0;
    --accent-blue: #00f0ff;
    --accent-purple: #8a2be2;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-darker);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
}

body { overflow-x: hidden; }

/* Typography */
h1, h2, h3, h4, .logo-text { font-family: var(--font-heading); font-weight: 700; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 20px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 15px; }
p { color: var(--text-muted); line-height: 1.6; margin-bottom: 15px; }

.highlight { color: var(--accent-blue); }
.highlight-gradient {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container { margin: 0 auto; padding: 0 20px; width: 100%; max-width: 1200px; }
.max-w-800 { max-width: 800px; margin: 0 auto; }

/* Components */
.btn {
    display: inline-block; padding: 12px 28px; border-radius: 30px;
    font-weight: 600; text-decoration: none; transition: var(--transition);
    cursor: pointer; font-family: var(--font-heading); border: none; font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    color: #fff; box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.5);
    transform: translateY(-2px); color: #fff;
}

.btn-outline {
    background: transparent; color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--accent-blue); background: rgba(0, 240, 255, 0.05); color: var(--text-main);
}

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%; display: flex; justify-content: space-between;
    align-items: center; padding: 20px 5%; z-index: 1000;
    background: rgba(4, 4, 6, 0.8); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-text { font-size: 1.8rem; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: var(--accent-blue); }
.mobile-menu-btn { display: none; font-size: 1.5rem; cursor: pointer; }

/* Sticky right button */
.sticky-cta {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%) rotate(-90deg);
    transform-origin: right bottom; background: var(--accent-blue); color: #000;
    padding: 10px 20px; font-weight: 700; text-decoration: none; border-radius: 10px 10px 0 0;
    z-index: 999; box-shadow: 0 -4px 15px rgba(0, 240, 255, 0.4); transition: var(--transition);
}
.sticky-cta:hover { background: #fff; }

/* Mobile Menu */
.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 300px; height: 100vh;
    background: var(--bg-dark); z-index: 1001; display: flex; flex-direction: column;
    padding: 80px 30px; transition: right 0.4s ease; border-left: 1px solid rgba(255,255,255,0.05);
}
.mobile-menu.open { right: 0; }
.mobile-menu a { margin-bottom: 20px; text-decoration: none; color: #fff; font-size: 1.2rem; }
.close-menu { position: absolute; top: 20px; right: 20px; font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; padding-top: 80px; text-align: center; }
.hero-content { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; }
.hero-bg-glow {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(138,43,226,0.15) 0%, rgba(0,240,255,0.05) 50%, rgba(4,4,6,0) 70%);
    z-index: 1; pointer-events: none;
}

/* Trust Strip */
.trust-strip {
    background: var(--bg-card); padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05); overflow: hidden; position: relative; display: flex;
}
.marquee { display: flex; width: 100%; overflow: hidden; }
.marquee-content {
    display: flex; white-space: nowrap; animation: marquee 20s linear infinite; gap: 40px;
}
.marquee-content span { font-weight: 500; font-size: 1.1rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px;}
.marquee-content span i { color: var(--accent-blue); }

@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Sections Common */
section { padding: 100px 0; }
.section-title { text-align: center; }
.section-subtitle { text-align: center; max-width: 600px; margin: 0 auto 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }

/* Portfolio */
.filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filter-btn {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1); color: var(--text-main);
    padding: 8px 16px; border-radius: 20px; cursor: pointer; transition: var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: rgba(0, 240, 255, 0.1); border-color: var(--accent-blue); color: var(--accent-blue);
}

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.portfolio-item {
    background: var(--bg-card); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition); opacity: 1; transform: translateY(0); display: flex; flex-direction: column;
}
.portfolio-item.hidden { display: none; }
.portfolio-item:hover {
    transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.5), 0 0 20px rgba(0,240,255,0.1);
    border-color: rgba(0,240,255,0.3);
}

.browser-mockup {
    background: #1a1a24; border-bottom: 1px solid rgba(255,255,255,0.05); padding-top: 25px;
    position: relative; border-radius: 12px 12px 0 0; overflow: hidden;
}
.browser-mockup::before {
    content: ''; position: absolute; top: 8px; left: 10px; width: 8px; height: 8px; border-radius: 50%;
    background: #ff5f56; box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
}

.portfolio-iframe-wrapper {
    height: 250px; width: 100%; overflow-y: auto; overflow-x: hidden; position: relative; background: #fff;
}
.portfolio-iframe-wrapper iframe {
    width: 100%; height: 1000px; border: none; pointer-events: none;
    transform: scale(0.8); transform-origin: top left; width: 125%; position: relative; z-index: 2;
}
.portfolio-item:hover .portfolio-iframe-wrapper iframe { pointer-events: auto; }
.portfolio-info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.portfolio-info-top h3 { margin-bottom: 5px; }
.portfolio-info-top .domain { font-size: 0.9rem; color: var(--accent-blue); display: block; margin-bottom: 10px; }
.portfolio-info-top p { font-size: 0.9rem; margin-bottom: 15px; }
.portfolio-info .btn { width: 100%; text-align: center; padding: 10px; display: block; margin-top: auto;}

.site-placeholder {
    width: 100%; height: 100%; background: linear-gradient(135deg, #1e1e2f, #2a2a40); display: flex;
    align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 1.2rem;
    position: absolute; top:0; left:0; z-index: 1;
}

/* Services & Case Studies */
.services-grid, .case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card, .case-card {
    background: var(--bg-card); padding: 30px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); transition: var(--transition);
}
.service-card { text-align: center; }
.service-card i { font-size: 2.5rem; color: var(--accent-purple); margin-bottom: 20px; }
.service-card:hover { background: var(--bg-card-hover); transform: translateY(-5px); border-color: rgba(138,43,226,0.3); }
.tag { font-size: 0.8rem; background: rgba(0,240,255,0.1); color: var(--accent-blue); padding: 4px 10px; border-radius: 12px; margin-right: 5px; display: inline-block; margin-bottom: 5px;}

/* Why Choose Me */
.check-list { list-style: none; }
.check-list li { margin-bottom: 15px; display: flex; align-items: center; gap: 15px; font-size: 1.1rem; }
.check-list i { color: var(--accent-blue); background: rgba(0,240,255,0.1); padding: 8px; border-radius: 50%; font-size: 0.9rem; }
.why-image .glow-box {
    width: 100%; height: 400px; border-radius: 20px; background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(0,240,255,0.05));
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 0 50px rgba(138,43,226,0.15); display: flex;
    align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.why-image .glow-box::after { content: "SpiderWebAi Ecosystem"; font-size: 1.5rem; font-family: var(--font-heading); font-weight: 700; color: rgba(255,255,255,0.5); letter-spacing: 2px; }

/* Process */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; text-align: center; margin-top: 40px;}
.step .circle { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple)); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; margin: 0 auto 15px; color: #fff;}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; text-align: center;}
.stat-card { background: var(--bg-card); padding: 40px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; }
.form-group { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
input, select, textarea {
    width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 15px;
    border-radius: 8px; color: #fff; font-family: var(--font-body); font-size: 1rem; transition: var(--transition);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent-blue); outline: none; background: rgba(255,255,255,0.08); }
.contact-card { background: var(--bg-card); padding: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* Footer */
.footer { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 50px; background: var(--bg-dark); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-brand h3 { margin-bottom: 10px; }
.socials { display: flex; gap: 15px; margin-top: 15px; }
.socials a { color: var(--text-muted); font-size: 1.2rem; transition: var(--transition); }
.socials a:hover { color: var(--accent-blue); transform: translateY(-3px); }
.footer-contact p { margin-bottom: 10px; }
.footer-contact i { color: var(--accent-blue); margin-right: 10px; width: 20px; text-align: center; }
.footer-links a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 10px; transition: var(--transition); }
.footer-links a:hover { color: var(--accent-purple); padding-left: 5px; }
.footer-bottom { text-align: center; padding: 20px; border-top: 1px solid rgba(255,255,255,0.05); color: var(--text-muted); font-size: 0.9rem; }

/* Utilities / Animations */
.reveal-up { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); }
.reveal-up.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.mt-5 { margin-top: 50px; }
.w-full { width: 100%; }

/* Chat Widget */
.chat-trigger {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff; cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.3); z-index: 1000; transition: var(--transition);
}
.chat-trigger:hover { transform: scale(1.1); box-shadow: 0 10px 25px rgba(138, 43, 226, 0.5); }

.chat-widget {
    position: fixed; bottom: 100px; right: 30px; width: 320px;
    background: var(--bg-dark); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.5); z-index: 1000;
    display: flex; flex-direction: column; overflow: hidden;
    transform: translateY(20px); opacity: 0; pointer-events: none; transition: var(--transition);
}
.chat-widget.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
.chat-header {
    background: var(--bg-card); padding: 15px 20px; display: flex;
    justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.chat-header h4 { font-size: 1.1rem; margin: 0; }
.chat-header i { cursor: pointer; color: var(--text-muted); transition: var(--transition); }
.chat-header i:hover { color: var(--accent-blue); }
.chat-body { padding: 20px; }
.chat-body p { font-size: 0.9rem; margin-bottom: 15px; }
.chat-body textarea { margin-bottom: 15px; height: 80px; resize: none; background: rgba(0,0,0,0.2); }

/* Responsive */
@media(max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .grid-2 { grid-template-columns: 1fr; }
    .form-group { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .sticky-cta { display: none; }
    .hero h1 { font-size: 2.5rem; }
    .contact-card { padding: 20px; }
    .chat-trigger { bottom: 20px; right: 20px; }
    .chat-widget { bottom: 90px; right: 20px; width: calc(100% - 40px); }
}
