/* ==========================================================
   Base & Reset
   ========================================================== */
:root {
    --primary: #2563EB;
    /* Deep Blue Accent */
    --primary-hover: #1D4ED8;
    --dark: #0A0A0A;
    --dark-alt: #171717;
    --text-main: #374151;
    --text-muted: #6B7280;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section-padding {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--dark);
    color: var(--bg-light);
}

.bg-dark h2,
.bg-dark h3 {
    color: var(--white);
}

.bg-dark p {
    color: #9CA3AF;
}

.accent {
    color: var(--primary);
}

.align-center {
    text-align: center;
}

.d-flex {
    display: inline-flex;
    align-items: center;
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

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

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

.btn-outline:hover {
    background-color: var(--dark);
    color: var(--white);
}

.btn-link {
    background-color: transparent;
    color: var(--dark);
    padding: 14px 0;
    font-weight: 500;
    position: relative;
}

.btn-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.btn-link:hover::after {
    width: 100%;
}

.btn-block {
    width: 100%;
}

/* ==========================================================
   Header & Navbar
   ========================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 16px 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

.nav-links .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
}

/* ==========================================================
   Hero Section
   ========================================================== */
.hero {
    padding-top: 150px;
    padding-bottom: 60px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.mockup-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f0f0f0;
    aspect-ratio: 4/3;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.mockup-frame:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================
   Portfolio Section
   ========================================================== */
.section-header {
    max-width: 600px;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.align-center.section-header {
    margin: 0 auto 60px auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.portfolio-item {
    display: block;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.portfolio-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background-color: #e5e7eb;
}

.portfolio-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portfolio-item:hover .portfolio-img-wrapper img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

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

.portfolio-overlay span {
    color: var(--white);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay span {
    transform: translateY(0);
}

.portfolio-info {
    padding: 24px;
}

.portfolio-info h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.portfolio-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========================================================
   Services Section
   ========================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--white);
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    padding: 40px 32px;
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-4px);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: var(--white);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================
   Contact Section
   ========================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.contact-text h2 {
    font-size: 3rem;
    margin-bottom: 24px;
}

.contact-text p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-perks {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perk {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1.05rem;
    font-weight: 500;
}

.perk svg {
    color: var(--primary);
}

.contact-form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modern-form .form-group {
    margin-bottom: 24px;
}

.modern-form label {
    display: block;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.modern-form input,
.modern-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--dark);
    background-color: var(--white);
    transition: var(--transition);
}

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .prefix {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 36px;
}

.form-success {
    margin-top: 24px;
    padding: 16px;
    background-color: #DEF7EC;
    color: #03543F;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: opacity 0.3s;
}

.form-success svg {
    color: #0E9F6E;
}

.hidden {
    display: none;
    opacity: 0;
}

/* ==========================================================
   Footer
   ========================================================== */
.footer {
    background-color: var(--dark-alt);
    color: var(--bg-light);
    padding-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
    padding-bottom: 60px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 16px;
    display: inline-block;
}

.footer-brand p {
    color: #9CA3AF;
    max-width: 400px;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.footer-links h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.footer-links a {
    display: block;
    color: #9CA3AF;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(4px);
}

.footer-bottom {
    background-color: var(--dark);
    padding: 24px 0;
    text-align: center;
    color: #6B7280;
    font-size: 0.9rem;
}

/* ==========================================================
   Media Queries
   ========================================================== */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-text h2 {
        font-size: 2.5rem;
        text-align: center;
    }

    .contact-text p {
        text-align: center;
    }

    .contact-perks {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-md);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 24px;
    }
}

/* ==========================================================
   Dark Mode Support (Automatic Detection)
   ========================================================== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #030712;
        color: #D1D5DB;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .logo {
        color: #F9FAFB;
    }

    .bg-light {
        background-color: #111827;
    }

    .portfolio-item,
    .service-card,
    .contact-form-wrapper {
        background-color: #1F2937;
    }

    .navbar {
        background-color: rgba(31, 41, 55, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .nav-links a:not(.btn) {
        color: #D1D5DB;
    }

    .nav-links a:not(.btn):hover {
        color: #60A5FA;
    }

    .btn-outline {
        border-color: #F9FAFB;
        color: #F9FAFB;
    }

    .btn-outline:hover {
        background-color: #F9FAFB;
        color: #111827;
    }

    .btn-link {
        color: #F9FAFB;
    }

    .mobile-menu-toggle {
        color: #F9FAFB;
    }

    .service-card {
        border-color: #374151;
    }

    .service-card:hover {
        border-color: rgba(37, 99, 235, 0.4);
    }

    .modern-form label {
        color: #D1D5DB;
    }

    .modern-form input,
    .modern-form textarea {
        background-color: #111827;
        border-color: #374151;
        color: #F9FAFB;
    }

    .modern-form input:focus,
    .modern-form textarea:focus {
        border-color: var(--primary);
    }

    .bg-dark {
        background-color: #111827;
    }

    .footer {
        background-color: #1F2937;
    }

    .footer-bottom {
        background-color: #030712;
    }

    .mockup-frame {
        border-color: #374151;
    }

    /* Redefining shadows for dark mode */
    :root {
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.24);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.16);
    }

    .nav-links.active {
        background-color: #1F2937;
    }

    .form-success {
        background-color: rgba(14, 159, 110, 0.2);
        color: #31C48D;
    }
}