:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #14b8a6;
    --accent-dark: #0d9488;
    --accent-glow: rgba(20, 184, 166, 0.2);
    --text-main: #334155;
    --text-muted: #64748b;
    --white: #ffffff;
    --bg-soft: #f8fafc;
    --glass: rgba(255, 255, 255, 0.8);
    --border: #e2e8f0;
    --radius-lg: 1.5rem;
    --radius-md: 0.75rem;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* Base Styles & Typography */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { 
    color: var(--primary); 
    line-height: 1.1; 
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 8vw, 5rem); }
h2 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

p { margin-bottom: 1.5rem; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* Layout Components */
.container { max-width: 1300px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 6rem 0; position: relative; } /* Reduced from 10rem to minimize whitespace */
.section-soft { background-color: var(--bg-soft); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: none;
    cursor: pointer;
    gap: 0.75rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.4);
    background: #000;
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 10px 20px -5px rgba(20, 184, 166, 0.3);
}

.btn-accent:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -10px rgba(20, 184, 166, 0.4);
    background: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

/* Header & Nav */
header {
    height: 90px; /* Reduced from 100px */
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s;
}

header.scrolled {
    height: 70px; /* Reduced from 80px */
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

header.scrolled .mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

.nav-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span { color: var(--accent); }

/* Navigation CTA */
.nav-cta { flex-shrink: 0; padding: 0.8rem 1.8rem; font-size: 0.95rem; }

/* Nav Links Desktop */
.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-links a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 1.5rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    display: block;
    padding: 1rem 0;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border);
    transition: color 0.3s;
}

.mobile-link:hover {
    color: var(--accent);
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* Social Proof Bar */
.social-proof-bar {
    background: var(--white);
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.social-proof-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.4;
    filter: grayscale(100%);
}

.social-proof-inner span {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* Hero Section */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, #f1f5f9, #ffffff);
    padding: 85px 0 5px; /* Extremely compressed vertical space */
}

.hero h1 { 
    font-size: clamp(2rem, 5vw, 3rem); /* Scaled down headline to fix height */
    margin-bottom: 0.2rem; 
}

.hero p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem; /* Tightened */
    max-width: 500px;
    line-height: 1.4;
}

.hero-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--accent-glow);
    color: var(--accent-dark);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 0.75rem; /* Tightened */
}

.stat-item h4 { font-size: 1.8rem; color: var(--accent); margin-bottom: 0.1rem; }
.stat-item p { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem; /* Reduced from 4rem */
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent-glow);
    color: var(--accent-dark);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 1.5rem;
}

.stat-item h4 { font-size: 2.5rem; color: var(--accent); margin-bottom: 0.25rem; }
.stat-item p { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.feature-card {
    background: var(--white);
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.4s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.icon-wrap {
    width: 70px;
    height: 70px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--accent);
}

/* Portfolio Grid */
.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 5rem;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 per row for 2 rows total */
    gap: 2rem;
}

.demo-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 400px; /* Slightly shorter for 4-column layout */
    background: var(--primary);
    box-shadow: var(--shadow-md);
}

.demo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.demo-card:hover .demo-image {
    transform: scale(1.1);
    opacity: 0.4;
}

.demo-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.9));
    color: var(--white);
}

.demo-content h3 { color: var(--white); font-size: 2rem; margin-bottom: 0.5rem; }
.demo-content p { color: rgba(255,255,255,0.7); margin-bottom: 2rem; }

/* Timeline / Process */
.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    position: relative;
}

.process-item {
    position: relative;
    z-index: 1;
}

.process-number {
    font-size: 6rem;
    font-weight: 900;
    color: var(--bg-soft);
    position: absolute;
    top: -2rem;
    left: -1rem;
    z-index: -1;
    line-height: 1;
}

.process-content h3 {
    margin-bottom: 1rem;
}

.process-content p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Pricing Section */
.pricing-wrap {
    background: var(--primary);
    border-radius: 3rem;
    padding: 8rem 4rem;
    color: var(--white);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.pricing-wrap::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.pricing-wrap h2 { color: var(--white); margin-bottom: 2rem; }
.price-tag { font-size: 5rem; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 1rem; }
.checklist { list-style: none; margin: 3rem 0; }
.checklist li {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.8);
}
.checklist li::before {
    content: '→';
    color: var(--accent);
    font-weight: 800;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.4s;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Enhancements */
.modal {
    max-width: 850px; /* Expanded back as requested */
    width: 100%;
    padding: 0;
    overflow: hidden;
    background: var(--white);
    border-radius: 2rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
}

.modal-info {
    background: var(--primary);
    padding: 2.5rem 2rem; /* Tightened height */
    color: var(--white);
}

.modal-form-wrap {
    padding: 2rem 2.5rem; /* Tightened height */
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem; /* Closer to edge */
    right: 1rem;
    width: 36px;
    height: 36px;
    background: var(--bg-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
    z-index: 10;
}

.close-modal:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(90deg) scale(1.1);
    border-color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1rem; /* Reduced from 1.5rem to fix modal height */
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    opacity: 0.8;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem; /* Thinner inputs to fix modal height */
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    font-size: 0.95rem;
    background: var(--bg-soft);
    color: var(--primary);
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
    opacity: 0.5;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate {
    animation: fadeInUp 0.8s forwards;
}

/* Responsive */
@media (max-width: 1024px) {
    .feature-grid, .process-grid, .hero-grid { grid-template-columns: 1fr; }
    .pricing-wrap { grid-template-columns: 1fr; padding: 4rem 2rem; }
    .demo-grid { grid-template-columns: repeat(2, 1fr); }
    header { height: 80px; }
    .hero { padding-top: 100px; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    .section { padding: 4rem 0; }
    
    /* Header Mobile */
    header { height: 70px; }
    .logo { font-size: 1.4rem; }
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .hamburger { display: flex; }
    
    /* Hero Mobile */
    .hero { padding: 80px 0 30px; text-align: center; }
    .hero-grid { text-align: center; gap: 2rem; }
    .hero-grid > div:first-child { display: flex; flex-direction: column; align-items: center; }
    .hero-grid > div:last-child { display: none; } /* Hide the deployment UI on mobile */
    .hero h1 { font-size: 2rem; line-height: 1.15; margin-bottom: 0.75rem; }
    .hero p { margin-left: auto; margin-right: auto; font-size: 1rem; line-height: 1.6; max-width: 100%; }
    .hero-badge { font-size: 0.7rem; padding: 0.5rem 1rem; margin-bottom: 1rem; }
    .hero-stats { 
        flex-direction: row; 
        flex-wrap: nowrap; 
        gap: 0; 
        justify-content: space-between; 
        width: 100%;
        margin-top: 1.5rem;
        border-top: 1px solid var(--border);
        padding-top: 1.5rem;
    }
    .stat-item { text-align: center; flex: 1; }
    .stat-item h4 { font-size: 1.5rem; }
    .stat-item p { font-size: 0.65rem; letter-spacing: 0.5px; }
    
    /* Hero Buttons Mobile */
    .hero-buttons { 
        flex-direction: column; 
        width: 100%; 
        gap: 0.75rem; 
    }
    .hero-buttons .btn { 
        padding: 1rem 1.5rem; 
        font-size: 0.95rem; 
        width: 100%; 
    }
    
    /* Social Proof Mobile */
    .social-proof-bar { padding: 1.5rem 0; }
    .social-proof-inner span { font-size: 0.8rem; letter-spacing: 1px; }
    .hide-mobile { display: none; }
    
    /* Portfolio Mobile */
    .portfolio-header { flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; }
    .portfolio-header h2 { font-size: 1.8rem; }
    .demo-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .demo-card { height: 280px; }
    .demo-content { padding: 1.5rem; }
    .demo-content h3 { font-size: 1.4rem; }
    .demo-content p { font-size: 0.9rem; margin-bottom: 1rem; }
    .demo-content .btn { padding: 0.75rem 1.25rem; font-size: 0.85rem; }
    
    /* Features Mobile */
    .feature-grid { gap: 1.5rem; }
    .feature-card { padding: 2rem 1.5rem; }
    .icon-wrap { width: 50px; height: 50px; font-size: 1.5rem; margin-bottom: 1rem; }
    .feature-card h3 { font-size: 1.2rem; }
    
    /* Process/Timeline Mobile */
    .process-grid {
        gap: 0;
        background: var(--white);
        border-radius: 1rem;
        padding: 0.5rem 1.25rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    }
    .process-item {
        display: flex;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border);
        position: relative;
    }
    .process-item:last-child {
        border-bottom: none;
    }
    .process-number {
        position: static;
        font-size: 0.9rem;
        font-weight: 800;
        color: var(--white);
        background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1;
        margin-top: 2px;
    }
    .process-content {
        flex: 1;
    }
    .process-content h3 {
        font-size: 1.05rem;
        margin-bottom: 0.35rem;
        color: var(--text);
    }
    .process-content p {
        font-size: 0.875rem;
        line-height: 1.55;
        color: var(--text-muted);
        margin: 0;
    }
    #process .text-center {
        margin-bottom: 2rem !important;
    }
    #process h2 {
        font-size: 1.5rem;
    }
    
    /* Pricing Mobile */
    .pricing-wrap { 
        text-align: center; 
        padding: 3rem 1.5rem; 
        border-radius: 1.5rem;
    }
    .checklist li { justify-content: center; font-size: 0.95rem; gap: 0.75rem; }
    .price-tag { font-size: 3rem; }
    .pricing-wrap h2 { font-size: 1.6rem; }
    
    /* Modal Mobile */
    .modal-overlay { padding: 1rem; }
    .modal-grid { grid-template-columns: 1fr; }
    .modal-info { display: none; }
    .modal { border-radius: 1rem; max-height: 90vh; overflow-y: auto; }
    .modal-form-wrap { padding: 2rem 1.5rem; }
    .close-modal { top: 0.75rem; right: 0.75rem; width: 32px; height: 32px; font-size: 1rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .hero h1 { font-size: 1.75rem; }
    .hero p { font-size: 0.9rem; }
    .stat-item h4 { font-size: 1.25rem; }
    .stat-item p { font-size: 0.6rem; }
    .demo-card { height: 240px; }
    .section { padding: 3rem 0; }
    h2 { font-size: 1.5rem; }
    .social-proof-bar { display: none; } /* Hide entirely on very small screens */
}
