/* ============================================
   SNRU SmartHub – Premium Landing Page
   ============================================ */

:root {
    --brand-primary: #355E3B;
    --brand-primary-dark: #2a4a2f;
    --brand-secondary: #A0522D;
    --brand-accent: #FFC300;
    --dark-900: #0f172a;
    --dark-800: #1e293b;
    --dark-700: #334155;
    --dark-600: #475569;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --white: #ffffff;
    --radius-xl: 24px;
    --radius-2xl: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'IBM Plex Sans Thai', 'Inter', -apple-system, sans-serif;
    color: #1e293b;
    overflow-x: hidden;
    background: var(--white);
    margin: 0;
}

/* ── Navbar ────────────────────────────────── */
.navbar {
    background: var(--white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--brand-primary);
    padding: 14px 0;
    transition: all 0.35s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 800;
    display: flex;
    align-items: center;
    color: var(--brand-primary) !important;
    text-decoration: none;
}

.navbar-brand img {
    height: 42px;
    margin-right: 12px;
    filter: brightness(1.1);
}

.navbar-brand span { color: var(--dark-800) !important; }

.nav-link {
    font-weight: 500;
    color: var(--dark-600) !important;
    margin: 0 8px;
    padding: 8px 14px !important;
    border-radius: 10px;
    transition: all 0.25s;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-primary) !important;
    background: rgba(53, 94, 59, 0.08);
}

.btn-login {
    background: var(--brand-primary);
    color: var(--white) !important;
    padding: 10px 26px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(53, 94, 59, 0.2);
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(53, 94, 59, 0.3);
    color: var(--white);
    background: var(--brand-primary-dark);
}

/* ── Hero Section ──────────────────────────── */
.hero-section {
    min-height: 100vh;
    background: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 140px 0 100px;
    overflow: hidden;
}

/* Animated gradient orbs */
.hero-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53, 94, 59, 0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(160, 82, 45, 0.1) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* Grid pattern overlay */
.hero-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(53, 94, 59, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(53, 94, 59, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(53, 94, 59, 0.1);
    border: 1px solid rgba(53, 94, 59, 0.2);
    color: var(--brand-primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--dark-800);
    margin-bottom: 28px;
    letter-spacing: -2px;
}

.hero-title span { color: var(--brand-primary); }

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--dark-600);
    max-width: 680px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--brand-primary);
    color: var(--white);
    padding: 18px 40px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 10px 40px rgba(53, 94, 59, 0.25);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.btn-hero-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px rgba(53, 94, 59, 0.35);
    color: var(--white);
    background: var(--brand-primary-dark);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--dark-800);
    padding: 18px 40px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.btn-hero-secondary:hover {
    background: #f8fafc;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

/* ── Stats Section ─────────────────────────── */
.stats-section {
    margin-top: -70px;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.stats-container {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: 0;
    box-shadow: 0 25px 80px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}

.stat-item {
    text-align: center;
    padding: 45px 30px;
    position: relative;
    transition: all 0.3s;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--slate-200);
}

.stat-item:hover { background: #fafbfc; }

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 18px;
}

.stat-icon.orange { background: #fff7ed; color: var(--brand-orange); }
.stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.stat-icon.green { background: #ecfdf5; color: #10b981; }

.stat-value {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--dark-800);
    margin-bottom: 6px;
    line-height: 1;
}

.stat-label {
    color: var(--slate-400);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Features Section ──────────────────────── */
.features-section {
    padding: 140px 0 100px;
    background: linear-gradient(180deg, var(--white) 0%, #f8fafc 100%);
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(53, 94, 59, 0.1);
    color: var(--brand-primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-heading {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--dark-800);
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.feature-card {
    background: var(--white);
    padding: 45px 35px;
    border-radius: var(--radius-xl);
    border: 1px solid #f1f5f9;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.06);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 28px;
    transition: all 0.3s;
}

.feature-icon.orange { background: rgba(53, 94, 59, 0.1); color: var(--brand-primary); }
.feature-icon.blue { background: rgba(160, 82, 45, 0.1); color: var(--brand-secondary); }
.feature-icon.green { background: #ecfdf5; color: #10b981; }
.feature-icon.purple { background: #f5f3ff; color: #8b5cf6; }

.feature-card:hover .feature-icon.orange { background: var(--brand-primary); color: var(--white); }
.feature-card:hover .feature-icon.blue { background: var(--brand-secondary); color: var(--white); }
.feature-card:hover .feature-icon.green { background: #10b981; color: var(--white); }
.feature-card:hover .feature-icon.purple { background: #8b5cf6; color: var(--white); }

.feature-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--dark-800);
}

.feature-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ── Map CTA Section ───────────────────────── */
.map-cta {
    padding: 120px 0;
    background: linear-gradient(160deg, var(--dark-900) 0%, var(--dark-800) 50%, var(--brand-primary-dark) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.map-cta::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 195, 0, 0.1) 0%, transparent 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
}

.map-cta h2 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.map-cta p {
    color: var(--slate-400);
    font-size: 1.15rem;
    line-height: 1.7;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--brand-primary);
    color: var(--white);
    padding: 18px 44px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 10px 40px rgba(53, 94, 59, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-cta:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 60px rgba(53, 94, 59, 0.4);
    color: var(--white);
    background: var(--brand-primary-dark);
}

/* ── Footer ────────────────────────────────── */
.footer {
    background: var(--dark-900);
    color: var(--slate-400);
    padding: 80px 0 40px;
    border-top: 5px solid var(--brand-primary);
}

.footer-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}

.footer h5 { font-size: 1rem; }

.footer a {
    color: var(--slate-400);
    transition: color 0.2s;
}

.footer a:hover { color: var(--brand-accent); }

/* ── Animations ────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out forwards;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 992px) {
    .hero-title { font-size: 2.8rem; letter-spacing: -1px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; max-width: 320px; justify-content: center; }
    .stat-item:not(:last-child)::after { display: none; }
    .stat-item { padding: 30px 20px; border-bottom: 1px solid var(--slate-200); }
    .stat-item:last-child { border-bottom: none; }
    .section-heading { font-size: 2rem; }
    .map-cta h2 { font-size: 2rem; }
    .features-section { padding: 80px 0 60px; }
}

@media (max-width: 576px) {
    .hero-section { padding: 100px 0 80px; }
    .hero-subtitle { font-size: 1.05rem; }
    .stat-value { font-size: 2.2rem; }
}
