/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Typography - Enhanced Scale */
:root {
    --font-scale-ratio: 1.25;
    --font-base: 1rem;
    --font-sm: calc(var(--font-base) / var(--font-scale-ratio));
    --font-lg: calc(var(--font-base) * var(--font-scale-ratio));
    --font-xl: calc(var(--font-lg) * var(--font-scale-ratio));
    --font-2xl: calc(var(--font-xl) * var(--font-scale-ratio));
    --font-3xl: calc(var(--font-2xl) * var(--font-scale-ratio));
    --font-4xl: calc(var(--font-3xl) * var(--font-scale-ratio));
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75em;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, var(--font-4xl));
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 4vw, var(--font-3xl));
    font-weight: 600;
}

h3 {
    font-size: clamp(1.25rem, 3vw, var(--font-2xl));
}

h4 {
    font-size: var(--font-xl);
}

h5 {
    font-size: var(--font-lg);
}

h6 {
    font-size: var(--font-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

p {
    margin-bottom: 1.5rem;
    font-size: var(--font-base);
    line-height: 1.7;
    color: #4a4a4a;
}

.lead {
    font-size: var(--font-lg);
    font-weight: 400;
    line-height: 1.6;
    color: #666;
}

/* Color Variables - Modern Warm Palette */
:root {
    --color-primary: #5B4E8C;
    --color-primary-dark: #483A70;
    --color-primary-light: #7B6FAF;
    --color-secondary: #FF6B6B;
    --color-secondary-dark: #E85555;
    --color-accent: #4ECDC4;
    --color-accent-light: #6FE5DD;
    --color-warm: #FFE66D;
    --color-text: #2D3436;
    --color-text-muted: #636E72;
    --color-bg-light: #FFF9F5;
    --color-bg-gradient: linear-gradient(135deg, #FFF9F5 0%, #F5EFFF 100%);
    --color-border: #E8DFF5;
    --shadow-sm: 0 2px 8px rgba(91, 78, 140, 0.08);
    --shadow-md: 0 4px 20px rgba(91, 78, 140, 0.12);
    --shadow-lg: 0 10px 30px rgba(91, 78, 140, 0.15);
}

/* Buttons - Enhanced */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-base);
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-dark);
    border-color: var(--color-secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo h1 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-tagline {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: var(--color-bg-gradient);
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--color-accent-light) 0%, transparent 70%);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-placeholder {
    width: 400px;
    height: 400px;
    background-color: #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.1rem;
    border: 2px dashed #cbd5e1;
}

/* Trust Indicators */
.trust-indicators {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 3rem 0;
    position: relative;
}

.trust-indicators::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.05"><polygon points="20 0 40 10 40 30 20 40 0 30 0 10"/></g></svg>');
    background-size: 40px 40px;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.trust-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #93c5fd;
}

.trust-item p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-header p {
    color: #64748b;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--color-bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3 {
    color: #2563eb;
    margin-bottom: 1.5rem;
}

.about-text h4 {
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-text ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-text li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.about-placeholder {
    width: 100%;
    height: 300px;
    background-color: #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.1rem;
    border: 2px dashed #cbd5e1;
}

/* Services Section */
.services {
    padding: 6rem 0;
    background-color: white;
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, var(--color-accent-light) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--color-warm) 0%, transparent 50%);
    opacity: 0.05;
    pointer-events: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-bg-light);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.service-card:hover::before {
    transform: translateX(0);
}

.service-icon {
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(91, 78, 140, 0.1));
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
}

.service-card li:last-child {
    border-bottom: none;
}

.service-card li:before {
    content: "✓";
    color: #2563eb;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Portfolio Section */
.portfolio {
    padding: 6rem 0;
    background-color: var(--color-bg-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(37, 99, 235, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-placeholder {
    height: 200px;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.1rem;
    border: 2px dashed #cbd5e1;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.portfolio-content p {
    color: #64748b;
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: #dbeafe;
    color: #2563eb;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Pricing Section */
.pricing {
    padding: 6rem 0;
    background-color: white;
    position: relative;
}

.pricing::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
    opacity: 0.1;
    pointer-events: none;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.pricing-card {
    background-color: var(--color-bg-light);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--color-border);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

.pricing-card.featured {
    border-color: var(--color-primary);
    background-color: #dbeafe;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.pricing-card.featured::before {
    content: 'Recommended';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: var(--font-sm);
    font-weight: 600;
}

.pricing-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.pricing-card p {
    color: #64748b;
    margin-bottom: 2rem;
}

.pricing-features ul {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    font-size: 1rem;
}

.pricing-features li:before {
    content: "✓";
    color: #2563eb;
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: var(--color-bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.contact-info h4 {
    color: #2563eb;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.contact-item {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info ul {
    margin-left: 1.5rem;
}

.contact-info li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Contact Form */
.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1e293b;
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #93c5fd;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-placeholder {
        width: 300px;
        height: 300px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-placeholder {
        width: 250px;
        height: 250px;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 3px solid #000;
    }
    
    .btn-outline {
        border: 3px solid #000;
    }
    
    .service-card,
    .portfolio-item,
    .pricing-card {
        border: 2px solid #000;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .contact-form,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll animations */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.animate-slide-left {
    opacity: 0;
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-right {
    opacity: 0;
    animation: slideInRight 0.6s ease forwards;
}

.animate-scale {
    opacity: 0;
    animation: scaleIn 0.6s ease forwards;
}

/* Stagger animations for grid items */
.services-grid .service-card {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.services-grid .service-card:nth-child(1) { animation-delay: 0.1s; }
.services-grid .service-card:nth-child(2) { animation-delay: 0.2s; }
.services-grid .service-card:nth-child(3) { animation-delay: 0.3s; }
.services-grid .service-card:nth-child(4) { animation-delay: 0.4s; }
.services-grid .service-card:nth-child(5) { animation-delay: 0.5s; }
.services-grid .service-card:nth-child(6) { animation-delay: 0.6s; }

.portfolio-grid .portfolio-item {
    opacity: 0;
    animation: scaleIn 0.5s ease forwards;
}

.portfolio-grid .portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-grid .portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-grid .portfolio-item:nth-child(3) { animation-delay: 0.3s; }

/* Smooth scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    cursor: pointer;
    animation: bounce 2s infinite;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}