/* ========================================
   HF Softwares - Main Stylesheet
   ======================================== */

:root {
    --primary: #1a2744;
    --primary-light: #2a3f6a;
    --primary-dark: #0f1a2e;
    --accent: #3b6cb5;
    --accent-light: #5a8ad4;
    --white: #ffffff;
    --gray-50: #f8f9fc;
    --gray-100: #f0f2f7;
    --gray-200: #e2e6ef;
    --gray-300: #c8cdd9;
    --gray-400: #9aa0b0;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gradient: linear-gradient(135deg, #3b6cb5, #5a8ad4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 180px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: rgba(26, 39, 68, 0.9);
    backdrop-filter: blur(12px);
}

.navbar.scrolled {
    background: rgba(26, 39, 68, 0.95);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo img {
    height: 140px;
    transition: var(--transition);
}

.navbar.scrolled .navbar-logo img {
    height: 105px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.btn-nav {
    background: var(--gradient) !important;
    color: var(--white) !important;
    padding: 10px 24px !important;
    border-radius: 8px;
    font-weight: 600;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 108, 181, 0.4);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

.navbar-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(59, 108, 181, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 108, 181, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--primary);
    overflow: hidden;
    padding: 200px 0 80px;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-light);
    bottom: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--white);
    top: 40%;
    left: 50%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(59, 108, 181, 0.2);
    color: var(--accent-light);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    border: 1px solid rgba(59, 108, 181, 0.3);
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero-text p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 36px;
    max-width: 520px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--white);
    font-weight: 700;
}

.stat span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

/* Code Window */
.hero-card {
    perspective: 1000px;
}

.code-window {
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotateY(-5deg) rotateX(2deg);
    transition: var(--transition);
}

.code-window:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.code-dots {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.code-content {
    padding: 24px;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
}

.code-content code {
    color: #e2e8f0;
}

.code-keyword { color: #c084fc; }
.code-var { color: #60a5fa; }
.code-prop { color: #34d399; }
.code-string { color: #fbbf24; }
.code-number { color: #f87171; }
.code-func { color: #38bdf8; }

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
    text-decoration: none;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    background: rgba(59, 108, 181, 0.1);
    color: var(--accent);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-500);
    line-height: 1.8;
}

/* ========================================
   About
   ======================================== */

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.about-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    text-align: center;
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.about-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 1.5rem;
    color: var(--white);
}

.about-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.about-card p {
    color: var(--gray-500);
    line-height: 1.7;
}

/* ========================================
   Services
   ======================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-card {
    position: relative;
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card.featured {
    border: 2px solid var(--accent);
    box-shadow: var(--shadow-md);
}

.service-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--gradient);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(59, 108, 181, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--gradient);
    color: var(--white);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.service-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-features li i {
    color: var(--accent);
    font-size: 0.75rem;
}

/* ========================================
   Process
   ======================================== */

.process-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.process-step {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px 0;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: var(--white);
    border: 3px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    z-index: 2;
    transition: var(--transition);
}

.process-step:hover .step-number {
    background: var(--gradient);
    border-color: transparent;
    color: var(--white);
    transform: scale(1.1);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.step-content p {
    color: var(--gray-500);
    line-height: 1.7;
}

.step-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: rgba(59, 108, 181, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
}

/* ========================================
   Technologies
   ======================================== */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.tech-item {
    background: var(--white);
    padding: 28px 16px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    cursor: default;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.tech-item i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}

.tech-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
}

.tech-icon-img {
    width: 2rem;
    height: 2rem;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    background: var(--primary);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.3;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.15rem;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Contact
   ======================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: rgba(59, 108, 181, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
}

.contact-item h4 {
    font-size: 0.85rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
}

.contact-item-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.contact-item-link:hover {
    opacity: 0.85;
}

.contact-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.contact-social a {
    width: 48px;
    height: 48px;
    background: rgba(59, 108, 181, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.contact-social a:hover {
    background: var(--gradient);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-700);
    background: var(--gray-50);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(59, 108, 181, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--primary-dark);
    padding: 64px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 140px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    max-width: 300px;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.925rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.875rem;
}

/* ========================================
   Back to Top
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Animations
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 2.75rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 32px 32px;
        gap: 4px;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .navbar-menu.active {
        right: 0;
    }

    .navbar-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.25rem;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .process-timeline::before {
        display: none;
    }

    .process-step {
        flex-direction: column;
        text-align: center;
    }

    .step-icon {
        display: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.85rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 70px 0;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}
