/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --secondary: #F97316;
    --secondary-light: #FB923C;
    --bg-dark: #0F172A;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Typography */
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;

    /* Other */
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --transition: 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    --header-height: 80px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

.section-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-md);
    text-align: center;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: var(--font-size-base);
    font-weight: 500;
    border-radius: 50px;
    transition: all var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

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

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

.btn-full {
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

/* Navigation */
.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
    position: relative;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    width: 32px;
    height: 24px;
    position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    position: absolute;
    transition: all var(--transition);
}

.hamburger {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger::before,
.hamburger::after {
    content: '';
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
    background: linear-gradient(135deg,
        var(--bg-light) 0%,
        rgba(37, 99, 235, 0.05) 50%,
        rgba(249, 115, 22, 0.03) 100%
    );
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.hero-content {
    max-width: 560px;
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

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

.hero-image img {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

/* ===== About Section ===== */
.about {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-content {
    order: 2;
}

.about-content .section-title {
    text-align: left;
}

.about-image {
    order: 1;
}

.about-image img {
    border-radius: var(--border-radius-lg);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* ===== Technology Section ===== */
.technology {
    padding: var(--space-3xl) 0;
    background: var(--bg-light);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.tech-card {
    background: var(--bg-white);
    padding: var(--space-xl);
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-light);
}

.tech-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(249, 115, 22, 0.1));
    border-radius: var(--border-radius-lg);
    color: var(--primary);
}

.tech-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.tech-desc {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ===== Products Section ===== */
.products {
    padding: var(--space-3xl) 0;
    background: var(--bg-white);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3xl);
}

.product-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.product-item.reverse {
    direction: rtl;
}

.product-item.reverse > * {
    direction: ltr;
}

.product-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.product-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.product-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.product-features {
    margin-bottom: var(--space-lg);
}

.product-features li {
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
    color: var(--text-secondary);
}

.product-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
}

/* ===== Contact Section ===== */
.contact {
    padding: var(--space-3xl) 0;
    background: var(--bg-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-2xl);
}

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

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: all var(--transition);
}

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

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding-top: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    color: var(--primary);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xs);
}

.contact-text p {
    color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand .logo-text {
    color: white;
}

.footer-desc {
    color: var(--text-light);
    margin: var(--space-md) 0;
    max-width: 280px;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: white;
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-links h4 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-md);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ===== Responsive Design ===== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --font-size-5xl: 2.75rem;
        --font-size-4xl: 2rem;
    }

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

    .hero-content {
        max-width: 100%;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 400px;
    }

    .about .container {
        grid-template-columns: 1fr;
    }

    .about-content {
        order: 1;
    }

    .about-content .section-title {
        text-align: center;
    }

    .about-image {
        order: 2;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-item,
    .product-item.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2.25rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
        --space-3xl: 4rem;
        --space-2xl: 3rem;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-md);
    }

    .nav-toggle {
        display: block;
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

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

    .footer-desc {
        max-width: 100%;
    }

    .social-links {
        justify-content: center;
    }

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

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --font-size-5xl: 1.875rem;
        --font-size-4xl: 1.5rem;
        --space-md: 1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--space-xl));
        padding-bottom: var(--space-xl);
    }

    .hero-image img {
        max-width: 280px;
    }

    .tech-card {
        padding: var(--space-lg);
    }

    .contact-form {
        padding: var(--space-lg);
    }
}
