/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

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

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

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

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
}

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

.nav-links a:hover::after {
    width: 100%;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--primary-color);
    top: -200px;
    right: -200px;
    opacity: 0.2;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    bottom: -100px;
    left: -100px;
    opacity: 0.2;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-text h1 {
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    padding: 40px;
}

.code-window {
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.window-header {
    display: flex;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.code-content {
    padding: 20px;
}

.code-content pre {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-content code {
    color: #e2e8f0;
}

.keyword { color: #c084fc; }
.variable { color: #60a5fa; }
.class { color: #fbbf24; }
.method { color: #34d399; }
.comment { color: #64748b; }

.floating-card {
    position: absolute;
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-1 {
    top: 20px;
    left: -20px;
    animation: floatCard 4s ease-in-out infinite;
}

.card-2 {
    bottom: 80px;
    left: -40px;
    animation: floatCard 4s ease-in-out infinite 1s;
}

.card-3 {
    top: 40%;
    right: -30px;
    animation: floatCard 4s ease-in-out infinite 2s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 15px auto 0;
}

/* ===== Services Section ===== */
.services {
    padding: 100px 0;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card.featured {
    border: 2px solid var(--primary-color);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--gradient-primary);
    color: white;
    padding: 5px 40px;
    font-size: 0.8rem;
    transform: rotate(45deg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.service-icon i {
    font-size: 1.8rem;
    color: white;
}

.service-card h3 {
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.service-features {
    margin-top: 20px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.service-features i {
    color: var(--primary-color);
}

/* ===== Features Section ===== */
.features {
    padding: 100px 0;
}

.features-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.features-content .section-badge {
    margin-bottom: 15px;
}

.features-content h2 {
    margin-bottom: 15px;
}

.features-content > p {
    color: var(--text-light);
    margin-bottom: 40px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.feature-text h4 {
    margin-bottom: 5px;
}

.feature-text p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Dashboard Preview */
.features-visual {
    position: relative;
}

.dashboard-preview {
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-nav {
    display: flex;
    gap: 15px;
}

.nav-item {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
}

.dashboard-user i {
    font-size: 1.5rem;
    color: #64748b;
}

.dashboard-content {
    padding: 20px;
}

.dashboard-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #64748b;
}

.dashboard-files {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.file-item i {
    font-size: 1.2rem;
}

.file-item i.fa-file-pdf { color: #ef4444; }
.file-item i.fa-file-word { color: #3b82f6; }
.file-item i.fa-file-excel { color: #22c55e; }

.ai-tag {
    margin-left: auto;
    background: var(--gradient-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: white;
}

/* ===== AI Section ===== */
.ai-section {
    padding: 100px 0;
    background: var(--bg-dark);
    color: white;
    overflow: hidden;
}

.ai-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.ai-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-brain {
    position: relative;
    width: 150px;
    height: 150px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-brain i {
    font-size: 4rem;
    color: white;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: pulse 3s ease-out infinite;
}

.pulse-ring.delay-1 { animation-delay: 1s; }
.pulse-ring.delay-2 { animation-delay: 2s; }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.ai-nodes {
    position: absolute;
    inset: 0;
}

.node {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    animation: nodeFloat 4s ease-in-out infinite;
}

.node-1 { top: 10%; left: 20%; animation-delay: 0s; }
.node-2 { top: 5%; right: 25%; animation-delay: 0.5s; }
.node-3 { top: 40%; left: 5%; animation-delay: 1s; }
.node-4 { top: 40%; right: 5%; animation-delay: 1.5s; }
.node-5 { bottom: 15%; left: 15%; animation-delay: 2s; }
.node-6 { bottom: 10%; right: 20%; animation-delay: 2.5s; }

@keyframes nodeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.ai-text .section-badge {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.ai-text h2 {
    margin-bottom: 15px;
}

.ai-text > p {
    color: #94a3b8;
    margin-bottom: 30px;
}

.ai-capabilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.capability {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
}

.capability i {
    color: var(--accent-color);
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.about-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.about-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.about-icon i {
    font-size: 2rem;
    color: white;
}

.about-card h3 {
    margin-bottom: 15px;
}

.about-card p {
    color: var(--text-light);
}

/* ===== Clients Section ===== */
.clients {
    padding: 60px 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.clients h3 {
    text-align: center;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 40px;
}

.clients-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.client-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #9ca3af;
    transition: var(--transition);
}

.client-logo:hover {
    color: var(--primary-color);
}

.client-logo i {
    font-size: 2.5rem;
}

.client-logo span {
    font-size: 0.9rem;
}

/* ===== Contact Section ===== */
.contact {
    padding: 100px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info .section-badge {
    margin-bottom: 15px;
}

.contact-info h2 {
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

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

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Form Validation Styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Message Styles */
.message {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.message.show {
    transform: translateX(0);
    opacity: 1;
}

.message-success {
    background: #10b981;
}

.message-error {
    background: #ef4444;
}

/* Focus Styles for Accessibility */
.focused {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 15px;
    display: inline-flex;
}

.footer-brand p {
    color: #94a3b8;
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #94a3b8;
    transition: var(--transition);
}

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

.footer-newsletter h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-newsletter p {
    color: #94a3b8;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
}

.newsletter-form input::placeholder {
    color: #94a3b8;
}

.newsletter-form button {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero-content,
    .features-wrapper,
    .ai-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-image {
        order: -1;
    }

    .hero-illustration {
        max-width: 400px;
        margin: 0 auto;
    }

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

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-toggle {
        display: block;
    }

    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .ai-capabilities {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .newsletter-form {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .floating-card {
        display: none;
    }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}
