/* ==========================================================================
   MOSMS - Modern Portal Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Color Palette */
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #3b82f6 100%);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --emerald-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --amber-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);

    --bg-page: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(226, 232, 240, 0.8);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 10px -3px rgba(0, 0, 0, 0.03);
    --card-hover-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.04);

    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.88);
    --nav-border: rgba(226, 232, 240, 0.7);
}

/* Dark Theme Overrides */
html.dark-theme {
    --bg-page: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.92);
    --card-border: rgba(55, 65, 81, 0.6);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    --card-hover-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.2);

    --text-heading: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --nav-bg: rgba(11, 15, 25, 0.88);
    --nav-border: rgba(55, 65, 81, 0.6);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-body);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-heading);
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.portal-navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--nav-border);
    transition: all 0.3s ease;
    z-index: 1050;
}

.portal-navbar .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-navbar .nav-link {
    font-weight: 600;
    color: var(--text-body);
    padding: 8px 16px !important;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.portal-navbar .nav-link:hover {
    color: var(--primary-600);
    background-color: rgba(37, 99, 235, 0.06);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-wrapper {
    position: relative;
    padding: 100px 0 80px;
    background: radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 10% 80%, rgba(37, 99, 235, 0.10) 0%, transparent 40%);
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--primary-600);
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.dark-theme .hero-title {
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 36px;
    line-height: 1.6;
}

.btn-hero-primary {
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-hero-primary:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.55);
}

.btn-hero-outline {
    background: var(--card-bg);
    color: var(--text-heading);
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-hero-outline:hover {
    color: var(--primary-600);
    border-color: var(--primary-600);
    transform: translateY(-3px);
}

/* KPI Counter Chips */
.kpi-chip-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.kpi-chip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.kpi-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-600);
    line-height: 1;
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   FEATURE CARDS & MATRIX
   ========================================================================== */
.section-tag {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-600);
    margin-bottom: 12px;
    display: inline-block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 50px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(37, 99, 235, 0.3);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 22px;
    color: #fff;
}

.feature-card h4 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-body);
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li i {
    color: #10b981;
    font-size: 0.85rem;
}

/* ==========================================================================
   FREE UTILITIES HUB
   ========================================================================== */
.tools-hub-wrapper {
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 60%);
    padding: 90px 0;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--card-shadow);
    transition: all 0.35s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
}

.tool-card.featured {
    border: 2px solid #6366f1;
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.tool-badge-pill {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tool-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 20px;
    color: #fff;
}

.btn-launch-tool {
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    text-decoration: none;
    margin-top: auto;
}

/* ==========================================================================
   INDEPENDENT TEACHER WORKSPACE
   ========================================================================== */
.teacher-workspace-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border-radius: 28px;
    padding: 50px 45px;
    color: #fff;
    box-shadow: 0 20px 40px -10px rgba(49, 46, 129, 0.35);
    position: relative;
    overflow: hidden;
}

.teacher-workspace-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.teacher-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.teacher-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #a5b4fc;
}

/* ==========================================================================
   JOIN US / SCHOOL ONBOARDING FORM
   ========================================================================== */
.join-us-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 45px;
    box-shadow: var(--card-shadow);
}

.form-control-portal {
    background: rgba(241, 245, 249, 0.6);
    border: 1.5px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 500;
    color: var(--text-body);
    transition: all 0.2s ease;
}

html.dark-theme .form-control-portal {
    background: rgba(30, 41, 59, 0.6);
    color: #f8fafc;
}

.form-control-portal:focus {
    background: var(--card-bg);
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.portal-footer {
    background: #090d16;
    color: #94a3b8;
    padding: 70px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.portal-footer a:hover {
    color: #60a5fa;
}

.portal-footer-heading {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.6rem;
    }
    .hero-wrapper {
        padding: 60px 0 50px;
    }
    .teacher-workspace-banner {
        padding: 35px 25px;
    }
    .join-us-card {
        padding: 30px 20px;
    }
}

/* ==========================================================================
   DEMO PROMOTION & SANDBOX SYSTEM
   ========================================================================== */
.demo-announcement-bar {
    background: linear-gradient(90deg, #1e1b4b 0%, #312e81 40%, #1e3a8a 100%);
    color: #f8fafc;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 1060;
}

.demo-announcement-bar .badge-glow {
    background: #f59e0b;
    color: #111827;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
    letter-spacing: 0.03em;
}

.demo-announcement-bar a.demo-top-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.demo-announcement-bar a.demo-top-btn:hover {
    background: #fff;
    color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

.demo-section-wrapper {
    background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.07) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.07) 0%, transparent 50%),
                var(--bg-page);
    position: relative;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.demo-school-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.demo-school-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(37, 99, 235, 0.4);
}

.demo-card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--card-border);
    position: relative;
}

.demo-card-header.gradient-blue {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(59, 130, 246, 0.02));
}

.demo-card-header.gradient-indigo {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.02));
}

.demo-card-header.gradient-emerald {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(16, 185, 129, 0.02));
}

.demo-school-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.demo-card-body {
    padding: 20px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.demo-cred-box {
    background: rgba(241, 245, 249, 0.7);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

html.dark-theme .demo-cred-box {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(55, 65, 81, 0.8);
}

.demo-cred-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.88rem;
}

.demo-cred-row:not(:last-child) {
    border-bottom: 1px dashed rgba(203, 213, 225, 0.6);
}

html.dark-theme .demo-cred-row:not(:last-child) {
    border-bottom-color: rgba(71, 85, 105, 0.6);
}

.demo-cred-val {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: var(--text-heading);
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

html.dark-theme .demo-cred-val {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-copy-cred {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s ease;
}

.btn-copy-cred:hover {
    color: var(--primary-600);
    background: rgba(37, 99, 235, 0.1);
}

.btn-demo-launch {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-demo-launch:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    color: #fff;
}

