/* ==============================================================================
   E-Hub KH — Master Styling System (Vanilla CSS)
   Aesthetic: Dark Modern EdTech, Glassmorphism, Gold & Cyberpunk Blue Accents
============================================================================== */

:root {
    --bg-dark: #090D16;
    --bg-card: rgba(18, 26, 43, 0.75);
    --bg-card-hover: rgba(28, 38, 62, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(56, 189, 248, 0.3);
    
    --primary: #2563eb;
    --primary-glow: #38bdf8;
    --accent-gold: #fbbf24;
    --accent-emerald: #10b981;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --font-khmer: 'Kantumruy Pro', sans-serif;
    --font-en: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-khmer), var(--font-en);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Glow Backgrounds */
.ambient-glow {
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    top: -100px;
    left: 20%;
    background: radial-gradient(circle, #3b82f6 0%, #1d4ed8 100%);
}

.glow-2 {
    top: 500px;
    right: 5%;
    background: radial-gradient(circle, #06b6d4 0%, #0284c7 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* --- Header & Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: rgba(9, 13, 22, 0.85);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    font-family: var(--font-en);
}

.kh-highlight {
    background: linear-gradient(135deg, #38bdf8, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.status-badge-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399 !important;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #10b981; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-block {
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    padding: 90px 0 60px;
    text-align: center;
}

.hero-container {
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 18px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    color: #38bdf8;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Countdown Wrapper */
.countdown-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 20px;
    max-width: 540px;
    margin: 0 auto 36px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.countdown-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countdown-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.countdown-box {
    background: rgba(9, 13, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 75px;
}

.countdown-box .number {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #38bdf8;
    font-family: var(--font-en);
}

.countdown-box .unit {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
}

.countdown-divider {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dim);
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

/* Metrics Bar */
.metrics-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.metric-item {
    border-right: 1px solid var(--border-color);
}

.metric-item:last-child {
    border-right: none;
}

.metric-value {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-en);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* --- Section Shared Styles --- */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-tag {
    font-size: 12px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 14px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* --- Pillars Grid --- */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 36px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(12px);
}

.pillar-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.pillar-card.featured {
    border-color: rgba(56, 189, 248, 0.4);
    background: linear-gradient(180deg, rgba(30, 58, 138, 0.25) 0%, rgba(18, 26, 43, 0.8) 100%);
}

.badge-card {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    letter-spacing: 0.5px;
}

.pillar-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.pillar-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.pillar-desc {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.pillar-features {
    list-style: none;
}

.pillar-features li {
    font-size: 13.5px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* --- Tech Section --- */
.tech-section {
    background: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.tech-card-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.text-left {
    text-align: left;
}

.tech-desc {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 28px;
}

.tech-stack-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stack-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14.5px;
    color: #cbd5e1;
}

.stack-dot {
    width: 8px;
    height: 8px;
    background: #38bdf8;
    border-radius: 50%;
}

.terminal-card {
    background: #0b1120;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.terminal-header {
    background: #020617;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    font-size: 11px;
    color: var(--text-dim);
    margin-left: 8px;
    font-family: var(--font-en);
}

.terminal-body {
    padding: 20px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
}

.terminal-body .cmd {
    color: #f8fafc;
    margin-bottom: 8px;
}

.terminal-body .prompt {
    color: #10b981;
}

.terminal-body .output {
    color: #38bdf8;
    font-family: monospace;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    padding: 32px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 10px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    color: #cbd5e1;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #38bdf8;
}

.submit-success-box {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* --- Footer --- */
.site-footer {
    background: #050810;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

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

.footer-brand {
    max-width: 400px;
}

.footer-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 16px;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-title { font-size: 36px; }
    .pillars-grid { grid-template-columns: 1fr; }
    .tech-card-wrapper { grid-template-columns: 1fr; }
    .metrics-bar { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
}
