/* =========================================
   1. CSS Variables & Reset
========================================= */
:root {
    --bg-color: #050505; /* สีพื้นหลังหลัก ดำสนิทดูพรีเมียม */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #ffffff;
    --nav-bg: rgba(5, 5, 5, 0.8);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Prompt', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   2. Navigation Bar
========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px); /* เอฟเฟกต์กระจก */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

/* เส้นใต้ตอน Hover เมนู */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* ปุ่ม Hamburger (ซ่อนในจอใหญ่) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn .bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* =========================================
   3. Hero Section
========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px; /* เผื่อพื้นที่ Navbar */
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeUp 1s ease-out forwards;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5.5rem); /* ปรับขนาดอักษรตามหน้าจออัตโนมัติ */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

/* การเน้นข้อความให้ดูอลังการ */
.highlight {
    background: linear-gradient(135deg, #fff 0%, #71717a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
}

/* แสงพื้นหลังเสริมความอลังการ */
.hero-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

/* =========================================
   4. Buttons (Call to Action)
========================================= */
.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 50px; /* ทรงแคปซูล ดูมินิมอล */
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-primary);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* =========================================
   5. Footer
========================================= */
footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   6. Keyframe Animations
========================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   7. Responsive Design (Mobile & Tablet)
========================================= */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block; /* แสดงปุ่ม Hamburger บนมือถือ */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(5, 5, 5, 0.98);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links ul {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .cta-group {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }
    
    /* Animation สำหรับปุ่ม Hamburger */
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}