/* ==========================================================================
   Base & Variables
   ========================================================================== */

:root {
    /* Colors */
    --primary: #f5cb77;         /* Theme Gold */
    --primary-hover: #e0b65f;
    --primary-light: #fef8eb;
    
    --secondary: #2563eb;       /* Tech Blue */
    --secondary-hover: #1d4ed8;
    
    --bg-color: #f8fafc;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.85);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border: #e2e8f0;
    
    /* Typography */
    --font-heading: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    
    /* Layout & Shadows */
    --max-width: 1200px;
    --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-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --radius-md: 12px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: var(--primary);
    opacity: 0.3;
    z-index: -1;
    border-radius: 4px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 18px;
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
    box-shadow: 0 4px 14px rgba(245, 203, 119, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 203, 119, 0.6);
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--bg-color);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 12px 0;
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-glass);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-main);
}

.logo i {
    color: var(--primary);
    font-size: 28px;
}

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

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

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

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    position: relative;
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(245,203,119,0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-bg-gradient::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -40%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.05) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light);
    color: #b48525;
    font-size: 14px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(245, 203, 119, 0.3);
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    position: relative;
}

/* QR Code Modal Overlay */
.qr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.qr-overlay.hidden {
    display: none;
}

.qr-card {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-card p {
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 16px;
}

.qr-image {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
    border-radius: 8px;
}

.close-qr {
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.close-qr:hover {
    color: var(--text-main);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-color) 0%, #ffffff 100%);
}

.section-header {
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--surface);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon i {
    font-size: 32px;
    color: #d97706;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ==========================================================================
   Roles Section
   ========================================================================== */

.roles {
    padding: 100px 0;
    background-color: var(--surface);
}

.roles-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 60px;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 60px;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 40px 60px;
    border: 1px solid var(--border);
}

.role-card.teacher {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-color: #bfdbfe;
}

.role-card.parent {
    background: linear-gradient(135deg, #f8fafc 0%, #fffbeb 100%);
    border-color: #fde68a;
    flex-direction: row-reverse;
}

.role-img-placeholder {
    flex: 1;
    height: 300px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.role-img-placeholder i {
    font-size: 100px;
    color: var(--text-light);
    opacity: 0.5;
}

.role-content {
    flex: 1;
}

.role-content h3 {
    font-size: 32px;
    margin-bottom: 24px;
}

.role-content ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.role-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 18px;
    color: var(--text-muted);
}

.role-content ul li i {
    color: var(--primary);
    font-size: 24px;
    margin-top: 2px;
}

.role-card.teacher ul li i {
    color: var(--secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: #0f172a;
    color: var(--text-light);
    padding: 60px 0 24px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
    justify-content: center;
}

.footer-brand p {
    margin-bottom: 40px;
    max-width: 300px;
}

.footer-bottom {
    width: 100%;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* ==========================================================================
   Animations & Responsive
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 44px;
    }
    .role-card, .role-card.parent {
        flex-direction: column;
        padding: 40px 30px;
        gap: 40px;
    }
    .role-img-placeholder {
        width: 100%;
        height: 240px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-subtitle {
        margin: 0 auto 32px;
    }
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
    }
    .qr-popup {
        left: 50%;
        transform: translateX(-50%);
    }
}
