:root {
    --primary: #3b82f6;
    --primary-glow: #60a5fa;
    --primary-dark: #1d4ed8;
    --accent: #8b5cf6;
    --green: #10b981;
    --secondary: #0f172a;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --glass-bg: rgba(255,255,255,0.75);
    --glass-border: rgba(255,255,255,0.5);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --transition: 0.35s cubic-bezier(0.2, 0.9, 0.4, 1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(15,23,42,0.07);
    --shadow-lg: 0 20px 50px rgba(15,23,42,0.12);
    --shadow-glow: 0 0 30px rgba(59,130,246,0.3);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}
body.sinhala-active {
    font-family: 'Noto Sans Sinhala', 'Plus Jakarta Sans', sans-serif;
}

/* Ambient background glows */
.ambient-glow {
    position: fixed; width: 600px; height: 600px;
    border-radius: 50%; filter: blur(130px); opacity: 0.06;
    pointer-events: none; z-index: 0;
}
.glow-1 { top: -200px; right: -200px; background: var(--primary); }
.glow-2 { bottom: -200px; left: -200px; background: var(--accent); }
.glow-3 { top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--primary); opacity: 0.03; }

.container {
    max-width: 1240px; margin: 0 auto; padding: 0 24px;
    position: relative; z-index: 1;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

h1,h2,h3,h4 { font-weight: 800; color: var(--text-dark); line-height: 1.15; letter-spacing: -0.03em; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-title { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin-bottom: 1rem; }
.section-subtitle { font-size: clamp(1rem, 1.8vw, 1.2rem); max-width: 700px; margin: 0 auto 3.5rem auto; color: var(--text-muted); }
.section { padding: clamp(70px, 9vw, 120px) 0; }
.light-bg { background-color: var(--bg-alt); }

/* Badges */
.badge-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; background: rgba(59,130,246,0.07);
    color: var(--primary); border-radius: 30px; font-size: 0.9rem;
    font-weight: 700; margin-bottom: 1.5rem; border: 1px solid rgba(59,130,246,0.15);
}
.badge-pill.light { background: rgba(255,255,255,0.8); }
.pulse-dot {
    width: 8px; height: 8px; background: var(--primary);
    border-radius: 50%; box-shadow: 0 0 0 0 rgba(59,130,246,0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59,130,246,0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(59,130,246,0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px; border-radius: 12px; font-weight: 700;
    text-decoration: none; transition: var(--transition); cursor: pointer;
    border: none; font-size: 1rem; white-space: nowrap;
}
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.btn-glow { box-shadow: var(--shadow-glow); }
.btn-glow:hover { transform: translateY(-3px); box-shadow: 0 15px 35px rgba(59,130,246,0.45); }
.btn-glass {
    background: rgba(255,255,255,0.7); backdrop-filter: blur(12px);
    color: var(--secondary); border: 1px solid var(--border);
}
.btn-glass:hover { background: #fff; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-secondary { background: #fff; color: var(--secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-alt); transform: translateY(-2px); }
.hover-float { transition: var(--transition); }
.hover-float:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

/* ─── NAVBAR ─── */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,0.85); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1240px; margin: 0 auto; padding: 16px 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo-container {
    display: flex; align-items: center; gap: 10px;
}
.logo-img { height: 32px; display: block; }
.logo-text {
    font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em;
}
.logo-tutor { color: var(--primary); }
.logo-fee { color: var(--green); }

.nav-menu { display: flex; align-items: center; gap: 36px; }
.nav-links { list-style: none; display: flex; gap: 28px; }
.nav-links a {
    text-decoration: none; color: var(--text-muted); font-weight: 600;
    font-size: 0.95rem; transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang-toggle {
    background: var(--bg-alt); border: 1px solid var(--border);
    padding: 9px 18px; border-radius: 30px; cursor: pointer;
    font-weight: 600; font-size: 0.88rem; transition: var(--transition);
    display: flex; align-items: center; gap: 6px;
}
.lang-toggle:hover { background: var(--border); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-dark); cursor: pointer; }

/* ─── HERO ─── */
.hero {
    position: relative; padding: clamp(60px, 8vw, 100px) 0;
    background: radial-gradient(100% 100% at 50% 0%, rgba(239,246,255,0.7) 0%, transparent 100%);
}
.hero-container { display: flex; align-items: center; gap: 60px; }
.hero-content { flex: 1.1; max-width: 620px; }
.hero-content h1 { font-size: clamp(2.8rem, 5vw, 4.2rem); margin-bottom: 1.5rem; }
.hero-content p { font-size: 1.2rem; margin-bottom: 2.5rem; line-height: 1.7; color: var(--text-muted); }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-media { position: relative; flex: 1; display: flex; justify-content: center; }

.floating-badge {
    position: absolute; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px);
    border: 1px solid var(--border); padding: 12px 18px; border-radius: 16px;
    display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-md);
    z-index: 20; animation: floatAnim 4s ease-in-out infinite alternate;
}
.badge-top { top: 10%; left: -20px; }
.badge-bottom { bottom: 12%; right: -20px; animation-delay: 2s; }
.fb-icon { width: 36px; height: 36px; background: #eff6ff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.floating-badge strong { display: block; font-size: 0.9rem; color: var(--text-dark); }
.floating-badge small { font-size: 0.75rem; color: var(--text-muted); }
@keyframes floatAnim { 0% { transform: translateY(0px); } 100% { transform: translateY(-12px); } }

/* ─── PHONE MOCKUP (with status bar) ─── */
.phone-frame {
    width: 280px; height: 580px;
    border-radius: 44px; background: #0f172a;
    box-shadow: 0 35px 70px rgba(15,23,42,0.25), 0 0 0 4px #1e293b, 0 0 30px rgba(59,130,246,0.15);
    position: relative; transition: var(--transition); overflow: hidden;
}
.phone-frame:hover { box-shadow: 0 40px 80px rgba(15,23,42,0.3), 0 0 0 4px #1e293b, 0 0 50px rgba(59,130,246,0.25); }
.phone-status-bar {
    position: absolute; top: 12px; left: 24px; right: 24px; height: 20px;
    display: flex; justify-content: space-between; align-items: center;
    color: #fff; font-size: 0.7rem; font-weight: 600;
    z-index: 15; pointer-events: none;
}
.phone-status-bar .signal-icons { display: flex; gap: 6px; align-items: center; }
.phone-status-bar .signal-bar {
    display: inline-block; width: 14px; height: 8px;
    background: #fff; border-radius: 2px;
}
.phone-dynamic-island {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 90px; height: 28px; background: #0f172a; border-radius: 20px;
    z-index: 10;
}
.phone-screen {
    width: 100%; height: 100%;
    border-radius: 40px; overflow: hidden;
    background: #000;
}
.screen-img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Slide animations for carousel */
@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-30%); opacity: 0; }
}
@keyframes slideInRight {
    from { transform: translateX(30%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(30%); opacity: 0; }
}
@keyframes slideInLeft {
    from { transform: translateX(-30%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.screen-img.slide-out { animation-duration: 0.35s; animation-fill-mode: forwards; }
.screen-img.slide-in { animation-duration: 0.35s; animation-fill-mode: forwards; }

.hero-phone-wrapper { position: relative; display: inline-block; }
.hero-phone { transform: rotate(-2deg); }

/* ─── SHOWCASE ─── */
.showcase-tabs { display: flex; justify-content: center; gap: 12px; margin-bottom: 50px; flex-wrap: wrap; }
.tab-btn {
    padding: 10px 24px; border-radius: 30px; background: var(--bg-alt);
    border: 1px solid var(--border); font-weight: 600; font-size: 0.95rem;
    color: var(--text-muted); cursor: pointer; transition: var(--transition);
}
.tab-btn.active, .tab-btn:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); }

.focus-phone-section { display: flex; justify-content: center; margin-bottom: 40px; }
.focus-phone-container { position: relative; display: flex; flex-direction: column; align-items: center; }
.focus-phone { width: 300px; height: 620px; margin: 0 auto; }
.carousel-dots { display: flex; gap: 12px; margin-top: 30px; }
.carousel-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--border);
    border: none; cursor: pointer; transition: var(--transition);
}
.carousel-dot.active { background: var(--primary); box-shadow: 0 0 12px var(--primary-glow); transform: scale(1.3); }
.carousel-nav { display: flex; gap: 20px; margin-top: 20px; }
.nav-arrow {
    background: #fff; border: 1px solid var(--border); border-radius: 50%;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1.2rem; color: var(--text-dark); transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.nav-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Thumbnail strip */
.thumbnail-strip-wrapper {
    width: 100%; overflow-x: auto; padding: 20px 0 40px;
    scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}
.thumbnail-strip { display: flex; gap: 20px; padding: 0 24px; width: max-content; }
.thumb-card {
    flex-shrink: 0; width: 120px; height: 240px; border-radius: 16px;
    overflow: hidden; cursor: pointer; border: 2px solid transparent;
    box-shadow: var(--shadow-sm); transition: var(--transition); background: #1e293b;
}
.thumb-card:hover, .thumb-card.active {
    border-color: var(--primary); box-shadow: 0 0 20px rgba(59,130,246,0.3);
    transform: translateY(-4px);
}
.thumb-card img { width: 100%; height: 100%; object-fit: cover; }

/* ─── GRIDS ─── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card, .feature-box {
    background: #fff; padding: 32px; border-radius: var(--radius-lg);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: var(--transition);
}
.glass-card { background: var(--glass-bg); backdrop-filter: blur(12px); }
.card-icon { font-size: 2.8rem; margin-bottom: 1.2rem; }
.feat-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }
.feat-icon svg { width: 26px; height: 26px; }
.blue-light { background: #eff6ff; color: #2563eb; }
.green-light { background: #f0fdf4; color: #16a34a; }
.purple-light { background: #faf5ff; color: #9333ea; }
.orange-light { background: #fff7ed; color: #ea580c; }

.workflow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 50px; }
.step { background: #fff; padding: 32px 20px; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.step-num { width: 50px; height: 50px; background: #eff6ff; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; margin: 0 auto 20px auto; }

.pricing-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; }
.pricing-desc { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.5rem; min-height: 48px; }
.price-tag { font-size: 2.5rem; font-weight: 800; color: var(--text-dark); margin-bottom: 1.5rem; }
.pricing-card.popular { border: 2px solid var(--primary); box-shadow: var(--shadow-glow); }
.popular-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }

.faq-container { max-width: 780px; margin: 0 auto; }
.faq-item { background: #fff; border-radius: 14px; margin-bottom: 16px; border: 1px solid var(--border); overflow: hidden; }
.faq-question { width: 100%; text-align: left; background: none; border: none; padding: 24px; font-size: 1.1rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--text-dark); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.faq-answer p { padding: 0 24px 24px; color: var(--text-muted); }
.arrow { transition: transform 0.3s; color: var(--primary); font-size: 0.85rem; }

/* ─── FOOTER ─── */
.footer { background: var(--secondary); color: #cbd5e1; padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 60px; }
.footer-logo-group { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-logo-img { height: 30px; filter: brightness(0) invert(1); }
.footer-logo-text { font-size: 1.3rem; font-weight: 800; }
.footer-logo-text .logo-tutor { color: var(--primary-glow); }
.footer-logo-text .logo-fee { color: var(--green); }
.footer h4 { color: #fff; margin-bottom: 20px; font-size: 1.05rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer a { color: #94a3b8; text-decoration: none; transition: var(--transition); font-size: 0.95rem; }
.footer a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.88rem; color: #64748b; }

.lightbox-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.9); backdrop-filter: blur(10px); align-items: center; justify-content: center; flex-direction: column; }
.lightbox-content { max-width: 90%; max-height: 80vh; border-radius: 24px; box-shadow: 0 25px 50px rgba(0,0,0,0.5); }
.lightbox-caption { color: #fff; font-size: 1.2rem; font-weight: 700; margin-top: 20px; }
.lightbox-close { position: absolute; top: 30px; right: 40px; color: #fff; font-size: 40px; font-weight: bold; cursor: pointer; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-container { flex-direction: column; text-align: center; }
    .hero-content { align-items: center; }
    .floating-badge { display: none; }
    .workflow-steps { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .focus-phone { width: 260px; height: 540px; }
}
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-menu {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: #fff; flex-direction: column; padding: 30px 24px; gap: 24px;
        box-shadow: var(--shadow-lg); border-top: 1px solid var(--border);
        transform: translateY(-150%); opacity: 0; visibility: hidden;
        transition: var(--transition); z-index: 999;
    }
    .nav-menu.active { transform: translateY(0); opacity: 1; visibility: visible; }
    .nav-links { flex-direction: column; width: 100%; text-align: center; }
    .nav-actions { flex-direction: column; width: 100%; }

    .grid-3, .grid-4, .workflow-steps, .footer-grid { grid-template-columns: 1fr; }
    .focus-phone { width: 240px; height: 500px; }
    .hero-phone { width: 220px; height: 460px; }
    .thumb-card { width: 90px; height: 180px; }
    .carousel-dots { gap: 8px; }
}