/* Color Variables & Base Setup */
:root {
    --bg-color: #f5f5f7;
    --bg-alt: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --dark-bg: #1d1d1f;
    --border-radius: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-alt);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utility Classes */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section {
    padding: 120px 0;
}

.bg-light {
    background-color: var(--bg-color);
}

.bg-dark {
    background-color: var(--dark-bg);
}

.text-white {
    color: #ffffff !important;
}

/* Typography */
h1 {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 60px;
    font-weight: 400;
}

p {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-small {
    font-family: inherit;
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 500;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid #d2d2d7;
}

.btn-secondary:hover {
    background: var(--bg-color);
}

.btn-small {
    padding: 8px 16px;
    background: var(--text-main);
    color: #fff !important;
    font-size: 13px;
}

.btn-small:hover {
    background: #000;
}

/* Hero Section */
.hero {
    padding: 200px 20px 120px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-buttons {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Grids */
.mission-grid,
.services-grid,
.portfolio-grid,
.features-grid {
    display: grid;
    gap: 30px;
}

.mission-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.features-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Cards & Elements */
.card,
.service-card {
    background: var(--bg-alt);
    padding: 50px 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    text-align: left;
    transition: transform 0.3s;
}

.service-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.card h3,
.service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Portfolio */
.portfolio-item {
    text-align: left;
    display: block;
    /* Makes the whole card a clickable link */
    transition: transform 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-img {
    width: 100%;
    height: 240px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    overflow: hidden;
    /* Ensures the image doesn't break out of the rounded corners */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    background-color: #e5e5ea;
    /* Fallback color while image loads */
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    /* Focuses on the top part of the webpage screenshot */
    transition: transform 0.5s ease;
    display: block;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

.portfolio-item h4 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--text-main);
}

.portfolio-item p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Features */
.feature h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature p {
    font-size: 15px;
}

/* Contact Form */
.contact-form {
    max-width: 500px;
    margin: 40px auto 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: background 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.2);
}

.contact-form select {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form option {
    color: #000;
}

.form-submit {
    width: 100%;
    margin-top: 10px;
}

/* Footer */
footer {
    padding: 40px 0;
    background: var(--bg-color);
    font-size: 14px;
}

/* Scroll Animation Engine */
.scroll-anim {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-anim.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    /* Hide links on mobile for simplicity, keep logo/button */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero {
        padding: 150px 20px 80px;
    }
}