:root {
    /* Electric Indigo Theme */
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --secondary: #10b981;
    --dark: #0f172a;
    --gray-dark: #1e293b;
    --gray-mid: #64748b;
    --gray-light: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    
    --font-main: 'Outfit', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.2);
    
    --radius: 16px;
    --radius-sm: 8px;
}

body.dark-mode {
    --bg: #0f172a;
    --white: #1e293b; 
    --dark: #f8fafc; /* Text becomes light */
    --gray-dark: #f1f5f9;
    --gray-mid: #94a3b8;
    --gray-light: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.5);
    
    background: var(--bg);
    color: var(--dark);
}
body.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
body.dark-mode .glass-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
}
body.dark-mode .float-card {
    background: var(--white); /* which is dark slatel */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Reset */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration:none; color:inherit; transition:0.3s; }
ul { list-style:none; }
button { font-family:inherit; cursor:pointer; border:none; outline:none; }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.full { width: 100%; }

/* Buttons */
.btn-primary {
    background: var(--dark);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-secondary:hover { border-color: var(--dark); }

.btn-xs {
    padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: 6px; background: var(--primary); color: white;
}
.btn-xs.secondary { background: var(--gray-light); color: var(--dark); }

.large { padding: 1rem 2rem; font-size: 1.1rem; }

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.8); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-inner { height: 80px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.25rem; }
.brand-icon {
    width: 36px; height: 36px; background: var(--primary); color: white;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.nav-menu { display: flex; gap: 2rem; }
.nav-menu a { color: var(--gray-mid); font-weight: 500; }
.nav-menu a:hover { color: var(--primary); }
.nav-actions { display: flex; gap: 1rem; align-items: center; }
.btn-text { font-weight: 600; color: var(--dark); }
.menu-toggle { display: none; font-size: 1.5rem; }

/* Hero */
.hero { padding: 180px 0 100px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.pill-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: white; border: 1px solid var(--gray-light);
    padding: 0.4rem 1rem; border-radius: 99px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 1.5rem;
}
.dot { width: 8px; height: 8px; background: var(--secondary); border-radius: 50%; display: block; }
.hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -1px; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 1.25rem; color: var(--gray-mid); margin-bottom: 2.5rem; max-width: 500px; }
.cta-group { display: flex; gap: 1rem; margin-bottom: 3rem; }
.proof { display: flex; align-items: center; gap: 1rem; color: var(--gray-mid); font-size: 0.9rem; font-weight: 500; }
.avatars { display: flex; }
.avatars img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid white; margin-left: -10px; }
.avatars img:first-child { margin-left: 0; }
/* Hero Visual */
.hero-visual { position: relative; perspective: 1000px; }
.glass-card {
    background: rgba(255,255,255,0.9); border: 1px solid white;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.03);
    border-radius: var(--radius); padding: 1.5rem;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: 0.5s ease-out;
}
.hero-visual:hover .glass-card { transform: rotateY(0) rotateX(0); }

.card-header { display: flex; justify-content: space-between; margin-bottom: 2rem; }
.traffic-lights { display: flex; gap: 6px; }
.traffic-lights span { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-light); }
.traffic-lights span:nth-child(1) { background: #fee2e2; }
.traffic-lights span:nth-child(2) { background: #fef3c7; }
.traffic-lights span:nth-child(3) { background: #dcfce7; }
.address-bar { background: var(--bg); padding: 4px 12px; border-radius: 6px; font-size: 0.75rem; color: var(--gray-mid); }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.stat-item { padding: 1rem; border-radius: 12px; background: var(--bg); }
.stat-item.active { background: var(--primary); color: white; }
.stat-item .label { display: block; font-size: 0.75rem; opacity: 0.8; margin-bottom: 0.25rem; }
.stat-item .value { font-size: 1.25rem; font-weight: 700; display: block; }
.stat-item .trend { font-size: 0.75rem; display: flex; align-items: center; gap: 4px; margin-top: 0.25rem; }
.stat-item.active .trend { color: #86efac; }

.chart-area { height: 100px; position: relative; overflow: hidden; background: #f1f5f9; border-radius: 8px; }
.wave {
    position: absolute; bottom: -50%; left: -10%; width: 120%; height: 120%;
    background: rgba(79, 70, 229, 0.1); border-radius: 40%;
    animation: wave 4s infinite linear;
}
.wave2 { background: rgba(79, 70, 229, 0.15); animation-duration: 6s; }

.float-card {
    position: absolute; background: white; padding: 0.75rem; border-radius: 12px;
    box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.85rem; z-index: 2; animation: float 4s ease-in-out infinite;
}
.float-1 { top: 20px; right: -20px; }
.float-2 { bottom: 40px; left: -30px; animation-delay: 2s; }
.icon-sq { width: 32px; height: 32px; background: #dcfce7; color: var(--secondary); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.icon-sq.warning { background: #fee2e2; color: #ef4444; }

.glow-bg {
    position: absolute; top: -20%; right: -10%; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(79,70,229,0.15), transparent 70%);
    z-index: -1; pointer-events: none;
}

/* Logos */
.logos { padding: 2rem 0; text-align: center; border-bottom: 1px solid var(--gray-light); }
.logos p { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: var(--gray-mid); margin-bottom: 1.5rem; }
.logo-row { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.logo-txt { font-weight: 700; color: var(--gray-dark); opacity: 0.5; }

/* Bento Grid */
.bento-grid-section { padding: 8rem 0; }
.section-head { margin-bottom: 4rem; text-align: center; } 
.section-head h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.section-head p { color: var(--gray-mid); font-size: 1.2rem; }

.bento-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px); gap: 1.5rem;
}
.bento-card {
    background: white; border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-light);
    transition: 0.3s; overflow: hidden; position: relative;
    display: flex; flex-direction: column;
}
.bento-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.bento-card.large { grid-column: span 2; grid-row: span 2; background: var(--dark); color: white; }
.bento-card.large p { color: #94a3b8; }
.bento-card.wide { grid-column: span 3; }

.icon-box { width: 48px; height: 48px; border-radius: 10px; background: var(--bg); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; }
.bento-card.large .icon-box { background: rgba(255,255,255,0.1); color: white; }

.visual-mockup { margin-top: auto; position: relative; }
.lifecycle-mock { display: flex; gap: 1rem; align-items: center; margin-top: 3rem; }
.timeline-dot { width: 16px; height: 16px; border-radius: 50%; background: #334155; border: 2px solid #1e293b; }
.timeline-dot.active { background: var(--primary); box-shadow: 0 0 10px var(--primary); border-color: white; }
.timeline-line { height: 2px; flex: 1; background: #334155; }

.card-content.row { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.mini-bar-chart { display: flex; gap: 8px; align-items: flex-end; height: 60px; }
.bar { width: 12px; background: var(--gray-light); border-radius: 4px; }
.bar.active { background: var(--primary); }

/* Interactive Demos */
.interactive-section { background: var(--dark); padding: 6rem 0; color: white; }
.demo-wrapper { display: grid; grid-template-columns: 250px 1fr; gap: 3rem; align-items: start; }
.demo-sidebar h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.demo-sidebar p { color: #94a3b8; margin-bottom: 2rem; font-size: 0.9rem; }
.demo-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.demo-btn {
    text-align: left; padding: 1rem; background: transparent; color: #94a3b8;
    border-radius: 8px; transition: 0.2s; display: flex; align-items: center; gap: 0.75rem;
}
.demo-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.demo-btn.active { background: var(--primary); color: white; font-weight: 600; }

.demo-stage {
    background: white; color: var(--dark); border-radius: var(--radius);
    min-height: 400px; padding: 2rem; position: relative; overflow: hidden;
}

.demo-view { display: none; animation: fadeIn 0.4s ease; height: 100%; }
.demo-view.active { display: flex; flex-direction: column; }

/* Demo: Fee */
.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.date-pill { font-size: 0.85rem; background: var(--bg); padding: 4px 10px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.centered { align-items: center; justify-content: center; height: 100%; display: flex; flex-direction: column; }

.donut-chart {
    width: 150px; height: 150px; border-radius: 50%;
    background: conic-gradient(var(--c) calc(var(--p)*1%), var(--bg) 0);
    display: flex; align-items: center; justify-content: center;
    transition: --p 1s ease; /* Browsers support var transition now usually, or fallback */
    margin-bottom: 2rem;
    position: relative;
}
.donut-chart::before {
    content: ''; position: absolute; width: 110px; height: 110px;
    background: white; border-radius: 50%;
}
.center-text { position: absolute; z-index: 1; text-align: center; }
.percentage { font-size: 2rem; font-weight: 800; line-height: 1; }
.sub { font-size: 0.75rem; color: var(--gray-mid); }

.stats-row { display: flex; gap: 1.5rem; margin-bottom: 2rem; }
.s-item { font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.s-item strong { font-size: 1rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.blue { background: var(--primary); }
.dot.gray { background: var(--bg); }
.controls { display: flex; gap: 0.5rem; }

/* Demo: Attendance */
.student-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.stu-card {
    background: var(--bg); padding: 1rem; border-radius: 12px;
    text-align: center; cursor: pointer; border: 2px solid transparent; transition: 0.2s;
}
.stu-card.present { border-color: var(--secondary); background: #f0fdf4; }
.stu-card.absent { border-color: #ef4444; background: #fef2f2; opacity: 0.8; }
.stu-avatar { width: 40px; height: 40px; border-radius: 50%; background: #cbd5e1; margin: 0 auto 0.5rem; font-size:0.8rem; display:grid; place-items:center; }
.toast {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(50px);
    background: var(--dark); color: white; padding: 0.5rem 1.5rem; border-radius: 99px; font-size: 0.9rem; opacity: 0; transition: 0.3s;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Demo: Admission */
.form-container { max-width: 400px; margin: 0 auto; margin-top: 2rem; }
.form-step { display: none; }
.form-step.active-step { display: block; animation: slideInRight 0.3s; }
.form-step label { font-size: 1.25rem; font-weight: 600; display: block; margin-bottom: 1.5rem; }
.form-step input {
    width: 100%; border: none; border-bottom: 2px solid var(--gray-light);
    font-size: 1.5rem; padding: 0.5rem 0; outline: none; font-family: inherit;
}
.form-step input:focus { border-color: var(--primary); }
.btn-icon {
    margin-top: 1.5rem; width: 50px; height: 50px; border-radius: 50%;
    background: var(--primary); color: white; font-size: 1.25rem;
    display: flex; align-items: center; justify-content: center; float: right;
}
.chip-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
    padding: 0.5rem 1rem; border: 1px solid var(--gray-light); border-radius: 99px;
    cursor: pointer; transition: 0.2s;
}
.chip.selected { background: var(--dark); color: white; border-color: var(--dark); }

.form-success { display: none; text-align: center; margin-top: 2rem; }
.form-success.active-step { display: block; animation: zoomIn 0.3s; }
.success-anim {
    width: 80px; height: 80px; background: #dcfce7; color: var(--secondary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 1.5rem;
}

/* Pricing */
.pricing-section { padding: 8rem 0; }
.pricing-cards { display: flex; justify-content: center; gap: 2rem; margin-top: 3rem; }
.p-card {
    width: 350px; background: white; border-radius: var(--radius);
    padding: 2.5rem; border: 1px solid var(--gray-light);
}
.p-card.dark { background: var(--dark); color: white; position: relative; border: none; transform: scale(1.05); box-shadow: var(--shadow-xl); }
.pop-tag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white; font-size: 0.75rem; font-weight: 700;
    padding: 2px 10px; border-radius: 4px; text-transform: uppercase;
}
.price { font-size: 2.5rem; font-weight: 700; margin: 1rem 0 2rem; }
.price span { font-size: 1rem; opacity: 0.6; font-weight: 400; }
.features li { margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.p-card .btn-secondary { width: 100%; justify-content: center; margin-top: 2rem; }
.p-card .btn-primary { width: 100%; justify-content: center; margin-top: 2rem; background: var(--primary); }

/* Footer */
footer { padding: 4rem 0; border-top: 1px solid var(--gray-light); font-size: 0.9rem; color: var(--gray-mid); }
.footer-inner { display: flex; justify-content: space-between; }
.links { display: flex; gap: 2rem; }

/* Animations */
@keyframes wave { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Responsive */
@media (max-width: 900px) {
    .nav-menu, .nav-actions { display: none; }
    .menu-toggle { display: block; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { display: none; } /* Hide complex visual on mobile */
    .hero h1 { font-size: 2.5rem; }
    .bento-grid { display: flex; flex-direction: column; }
    .demo-wrapper { grid-template-columns: 1fr; }
    .pricing-cards { flex-direction: column; align-items: center; }
}