/* Base Variables */
:root {
    --primary: #005AE0;
    --primary-hover: #0045B3;
    --primary-light: #E5F0FF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --bg-white: #FFFFFF;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --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);
}

/* Reset and Global Setup */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg-white); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* Utility Classes */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.highlight { color: var(--primary); }
.section { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }
.section-header { margin-bottom: 60px; }
.section-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.02em; word-break: keep-all; }
.section-desc { font-size: 1.125rem; color: var(--text-muted); word-break: keep-all; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; border: none;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background-color: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background-color: var(--primary-light); }
.btn-large { padding: 16px 32px; font-size: 1.125rem; border-radius: 12px; }

/* Header */
.header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent; transition: all 0.3s ease;
}
.header.scrolled { border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.logo span { color: var(--primary); }
.nav-list { display: flex; align-items: center; gap: 32px; }
.nav-list li a:not(.btn) { font-weight: 500; color: var(--text-main); transition: color 0.2s; }
.nav-list li a:not(.btn):hover { color: var(--primary); }

/* Hero Section */
.hero { position: relative; padding: 160px 0 100px; overflow: hidden; }
.hero-bg-glow {
    position: absolute; top: 50%; left: 50%; width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(0, 90, 224, 0.08) 0%, rgba(255,255,255,0) 70%);
    transform: translate(-50%, -50%); z-index: -1;
}
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 60px; }
.hero-content { flex: 1; max-width: 600px; }
.badge {
    display: inline-block; padding: 6px 12px; background-color: var(--primary-light);
    color: var(--primary); font-size: 0.875rem; font-weight: 600; border-radius: 100px; margin-bottom: 24px;
}

/* Character Animation Styles for Hero Title */
.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 24px; letter-spacing: -0.03em; }
.hero-title .line { overflow: hidden; display: block; }
.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%) rotate(5deg);
    animation: chwararak 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes chwararak {
    0% { opacity: 0; transform: translateY(100%) rotate(5deg); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg); filter: blur(0px); }
}

.hero-desc { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 40px; word-break: keep-all; }
.hero-visual { flex: 1; position: relative; height: 400px; display: flex; align-items: center; justify-content: center; }
.floating-card {
    position: absolute; background: white; padding: 20px 30px; border-radius: 16px; box-shadow: var(--shadow-xl);
    font-weight: 700; font-size: 1.25rem; border: 1px solid rgba(255,255,255,0.5); backdrop-filter: blur(8px);
    white-space: nowrap;
}
.c1 { top: 20%; left: 10%; animation: float 6s ease-in-out infinite; color: #10B981; }
.c2 { top: 50%; right: 5%; animation: float 5s ease-in-out infinite 1s; color: var(--primary); }
.c3 { bottom: 15%; left: 25%; animation: float 7s ease-in-out infinite 2s; color: #F59E0B; }
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Offer Section */
.offer-card {
    max-width: 800px; margin: 40px auto 0; background: white; border-radius: 24px;
    box-shadow: var(--shadow-xl); overflow: hidden; position: relative; border: 1px solid var(--border-color);
}
.offer-header { background: var(--primary); color: white; padding: 30px; display: flex; justify-content: space-between; align-items: center; }
.offer-header h3 { font-size: 1.5rem; font-weight: 700; word-break: keep-all; }
.tag { background: #EF4444; color: white; padding: 4px 12px; border-radius: 100px; font-size: 0.875rem; font-weight: 700; }
.offer-body { padding: 40px; }
.feature-item { display: flex; align-items: flex-start; gap: 20px; text-align: left; }
.feature-item .icon { font-size: 2.5rem; line-height: 1; }
.feature-text h4 { font-size: 1.25rem; margin-bottom: 8px; word-break: keep-all; }
.feature-text p { word-break: keep-all; }
.feature-divider { color: var(--text-muted); margin: 20px 0; font-size: 1.5rem; opacity: 0.5; }
.price { font-size: 1.5rem; color: var(--primary); }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; }
.service-card {
    background: white; padding: 40px 30px; border-radius: 16px; transition: all 0.3s ease;
    border: 1px solid transparent; box-shadow: var(--shadow-sm);
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.service-icon { font-size: 3rem; margin-bottom: 24px; }
.service-card h3 { font-size: 1.25rem; margin-bottom: 12px; word-break: keep-all; }
.service-card p { color: var(--text-muted); word-break: keep-all; }

/* Portfolio Section */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 50px; }
.portfolio-item {
    position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/3;
    display: flex; align-items: center; justify-content: center; background-color: var(--bg-light);
    color: var(--text-main); transition: all 0.3s ease; border: 1px solid var(--border-color);
}
.portfolio-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--bg-white)); opacity: 0.5; transition: opacity 0.3s;
}
.portfolio-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.portfolio-item:hover .portfolio-bg { opacity: 1; }
.portfolio-content { position: relative; z-index: 1; text-align: center; }
.portfolio-content h3 { font-size: 1.125rem; margin-bottom: 8px; word-break: keep-all; }
.view-btn { font-size: 0.875rem; font-weight: 600; color: var(--primary); }

/* Contact form */
.contact-inner {
    display: flex; gap: 60px; align-items: flex-start; background: var(--bg-light);
    border-radius: 24px; padding: 60px;
}
.contact-info, .contact-form-wrapper { flex: 1; width: 100%; }
.contact-info .section-title { margin-bottom: 24px; }
.inquiry-form { background: white; padding: 40px; border-radius: 16px; box-shadow: var(--shadow-lg); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.875rem; }
.req { color: #EF4444; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 8px;
    font-size: 1rem; transition: border-color 0.2s; outline: none; background: var(--bg-light);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); background: white; }
.btn-submit { width: 100%; padding: 16px; font-size: 1.125rem; }

/* Footer */
.footer { background-color: #111827; color: white; padding: 60px 0 40px; text-align: center; }
.footer-logo { font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; }
.footer-logo span { color: #60A5FA; }
.footer-info p { color: #9CA3AF; font-size: 0.875rem; margin-bottom: 4px; }
.copyright { margin-top: 16px; opacity: 0.5; }

/* Scroll Animation Classes */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* Mobile Optimizations */
@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .section-title { font-size: 1.8rem; }
    .section-header { margin-bottom: 40px; }
    
    /* Header (Mobile UI) */
    .header-inner { flex-direction: row; justify-content: space-between; }
    .nav-list { gap: 16px; }
    .nav-list li:not(:last-child) { display: none; } /* Show only the contact button */
    .nav-btn { font-size: 0.875rem; padding: 8px 16px; }
    
    /* Hero Setion */
    .hero { padding: 120px 0 60px; text-align: center; }
    .hero-inner { flex-direction: column; gap: 40px; }
    .hero-content { align-items: center; display: flex; flex-direction: column; }
    .hero-title { font-size: 2.2rem; }
    .hero-desc { font-size: 1.05rem; }
    .hero-visual { display: flex; flex-direction: column; gap: 15px; height: auto; align-items: center; margin-top: 20px; }
    .floating-card { position: static; animation: none; transform: none !important; width: 100%; max-width: 280px; text-align: center; }
    
    /* Offer Section */
    .offer-body { padding: 25px 20px; }
    .offer-header { flex-direction: column; gap: 12px; text-align: center; }
    .feature-item { flex-direction: column; text-align: center; align-items: center; }
    .feature-divider { transform: rotate(90deg); margin: 0; padding: 0; }
    
    /* Services & Portfolio Grid */
    .service-grid { grid-template-columns: 1fr; gap: 20px; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    
    /* Contact Form */
    .contact-inner { flex-direction: column; padding: 30px 20px; gap: 30px; }
    .contact-info { text-align: center; }
    .inquiry-form { padding: 25px 20px; }
}

@media (max-width: 480px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}
