* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #1d1d1f;
    --primary-light: #f8f9fa;
    --accent-blue: #007aff;
    --accent-light: #e8f4fd;
    --text-primary: #1d1d1f;
    --text-secondary: #6c757d;
    --text-muted: #8e8e93;
    --white: #ffffff;
    --border-light: rgba(0,0,0,0.06);
    --shadow-subtle: rgba(0,0,0,0.04);
    --shadow-medium: rgba(0,0,0,0.08);
    --glass-bg: rgba(255,255,255,0.85);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--white);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 20px var(--shadow-subtle);
}

nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 4px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
    transform: translateY(-1px);
}

.logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
    position: relative;
    padding: 8px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--text-primary);
}

/* HERO SECTION */
main {
    margin-top: 50px;
}

.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23e9ecef" stroke-width="1" opacity="0.8"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 800px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(60px);
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

.hero-subtitle {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 17px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.25);
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.35);
}

/* MATH SYMBOLS FLOATING */
.math-symbols {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.math-symbol {
    position: absolute;
    font-size: clamp(24px, 4vw, 48px);
    color: var(--accent-blue);
    opacity: 0.1;
    animation: floatMath 8s ease-in-out infinite;
    font-weight: 300;
}

.math-symbol:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.math-symbol:nth-child(2) { top: 30%; right: 20%; animation-delay: -2s; }
.math-symbol:nth-child(3) { top: 60%; left: 10%; animation-delay: -4s; }
.math-symbol:nth-child(4) { top: 70%; right: 15%; animation-delay: -6s; }
.math-symbol:nth-child(5) { top: 40%; left: 70%; animation-delay: -1s; }

/* SECTIONS */
.section {
    padding: 120px 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--primary-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-header.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: clamp(18px, 2vw, 20px);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* SERVICES GRID */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 80px;
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
}

.service-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-light) 0%, rgba(0, 122, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-medium);
    border-color: rgba(0, 122, 255, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0056d6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary) !important;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
}

.service-card p {
    color: var(--text-secondary) !important;
    line-height: 1.6;
    font-size: 16px;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 2;
}

/* ABOUT SECTION */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    text-align: center;
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-image.animate {
    opacity: 1;
    transform: translateX(0);
}

.profile-container {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0056d6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 122, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-container:hover {
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 122, 255, 0.3);
}

.about-text {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-text.animate {
    opacity: 1;
    transform: translateX(0);
}

.about-text h3 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.about-text p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.about-text ul {
    list-style: none;
    margin: 24px 0;
}

.about-text li {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    letter-spacing: -0.01em;
}

.about-text li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: 600;
}

/* PRICING SECTION */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 80px;
}

.price-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
}

.price-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.price-card:nth-child(2) {
    border-color: var(--accent-blue);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.15);
}

.price-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.price-card:nth-child(2):hover {
    transform: translateY(-8px) scale(1.04);
}

.price-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.price {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.price-unit {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.price-features {
    list-style: none;
    margin-bottom: 32px;
}

.price-features li {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

/* CONTACT SECTION */
.contact-section {
    background: var(--text-primary);
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-form {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-form.animate {
    opacity: 1;
    transform: translateY(0);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--white);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.form-group select option {
    background: var(--text-primary);
    color: var(--white);
    padding: 10px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
    transform: translateY(-1px);
}

.submit-btn {
    width: 100%;
    background: var(--accent-blue);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submit-btn:hover {
    background: #0056d6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

.contact-info {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-info.animate {
    opacity: 1;
    transform: translateY(0);
}

.contact-info h3 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.contact-info p {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    font-size: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.contact-details .icon {
    width: 24px;
    height: 24px;
    background: var(--accent-blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* FOOTER */
footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ANIMATIONS */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatMath {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
        opacity: 0.2;
    }
}

/* STAGGERED ANIMATIONS */
.animate-stagger-1 { transition-delay: 0.1s; }
.animate-stagger-2 { transition-delay: 0.2s; }
.animate-stagger-3 { transition-delay: 0.3s; }
.animate-stagger-4 { transition-delay: 0.4s; }
.animate-stagger-5 { transition-delay: 0.5s; }
.animate-stagger-6 { transition-delay: 0.6s; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px 24px;
        border-top: 1px solid var(--border-light);
        gap: 16px;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .section {
        padding: 80px 0;
    }

    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .profile-container {
        width: 200px;
        height: 200px;
        font-size: 80px;
    }

    .contact-form {
        padding: 32px;
    }

    .services-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .price-card:nth-child(2) {
        transform: none;
    }

    .math-symbol {
        font-size: 20px;
    }
}

/* PERFORMANCE OPTIMIZATIONS */
.optimize-scroll {
    will-change: transform, opacity;
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
