/*
 * =========================================================
 *              WEBSITE DEVELOPMENT CREDITS
 * =========================================================
 *
 * Co-Developer
 * AFM_1337_ — Md Arafat Hossen Mugdho
 * GitHub  : https://github.com/AFM-1337
 * Website : https://afm1337.shop
 * WhatsApp: https://wa.me/+8801310329198
 * Telegram: https://t.me/afm1337
 *
 * Co-Developer
 * DARK LMNx9 — Limon Hossain
 * GitHub  : https://github.com/LMNx9-JOHNY
 * Website : https://dark.lmnx9.workers.dev
 * WhatsApp: https://wa.me/+8801882168975
 * Telegram: https://t.me/x_LMNx9
 *
 * ---------------------------------------------------------
 *          Designed & Developed Together
 * =========================================================
 */

/* ============================================================
   BeBrainer SSC - Core Design System
   Modern Educational UI / Premium SaaS / Glassmorphism
   Palette: #5680E9 #84CEEB #5AB9EA #C1C8E4 #8860D0
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* Brand palette (same as homepage) */
    --bbx-magenta: #B832A8;
    --bbx-purple: #823BB5;
    --bbx-indigo: #5037A6;
    --bbx-grad: linear-gradient(120deg, #B832A8 0%, #823BB5 52%, #5037A6 100%);
    --bbx-grad-soft: linear-gradient(120deg, rgba(184, 50, 168, .10) 0%, rgba(80, 55, 166, .10) 100%);
    --bbx-ink: #1C1630;
    --bbx-ink-2: #4C4463;
    --bbx-ink-3: #79718F;
    --bbx-line: #E9E5F2;
    --bbx-surface: #FFFFFF;
    --bbx-tint: #F8F6FC;
    --bbx-r: 4px;
    --bbx-r-lg: 6px;
    --bbx-sh-sm: 0 1px 2px rgba(28, 22, 48, .06), 0 4px 14px rgba(28, 22, 48, .05);
    --bbx-sh: 0 10px 30px rgba(80, 55, 166, .10);
    --bbx-sh-lg: 0 18px 44px rgba(80, 55, 166, .16);
    --bbx-t: .24s cubic-bezier(.4, 0, .2, 1);

    --bb-primary: #823BB5;
    --bb-primary-dark: #5037A6;
    --bb-secondary: #B832A8;
    --bb-accent: #B832A8;
    --bb-light: #E9E5F2;
    --bb-purple: #823BB5;

    --bb-gradient: linear-gradient(120deg, #B832A8 0%, #823BB5 52%, #5037A6 100%);
    --bb-gradient-soft: linear-gradient(120deg, #B832A8 0%, #823BB5 100%);
    --bb-gradient-warm: linear-gradient(120deg, #823BB5 0%, #5037A6 100%);

    --bb-bg: #FBFAFE;
    --bb-bg-alt: #F3F1FA;
    --bb-surface: #FFFFFF;
    --bb-surface-2: #F8F6FC;
    --bb-border: #E9E5F2;
    --bb-border-strong: #D6CFE8;

    --bb-text: #1C1630;
    --bb-text-2: #4C4463;
    --bb-text-3: #79718F;
    --bb-white: #FFFFFF;

    --bb-success: #22C55E;
    --bb-danger: #EF4444;
    --bb-warning: #F59E0B;

    /* Square-ish geometry */
    --bb-radius-sm: 3px;
    --bb-radius: 4px;
    --bb-radius-lg: 6px;
    --bb-radius-xl: 8px;
    --bb-radius-pill: 999px;

    --bb-shadow-sm: 0 1px 2px rgba(28, 22, 48, .06), 0 4px 14px rgba(28, 22, 48, .05);
    --bb-shadow: 0 10px 30px rgba(80, 55, 166, .10);
    --bb-shadow-lg: 0 18px 44px rgba(80, 55, 166, .16);
    --bb-shadow-primary: 0 10px 28px rgba(130, 59, 181, .30);

    --bb-font: 'Hind Siliguri', sans-serif;
    --bb-font-display: 'Hind Siliguri', sans-serif;

    --bb-header-h: 72px;
    --bb-gutter: clamp(16px, 4vw, 64px);
    --bb-space: 8px;
    --bb-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--bb-font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--bb-text);
    background: var(--bb-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--bb-primary-dark);
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

:focus-visible {
    outline: 3px solid rgba(86, 128, 233, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bb-font-display);
    line-height: 1.25;
    color: var(--bb-text);
    font-weight: 700;
}

::selection {
    background: rgba(86, 128, 233, 0.25);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bb-bg-alt);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--bb-primary), var(--bb-purple));
    border-radius: 10px;
    border: 2px solid var(--bb-bg-alt);
}

/* ---------- Typography ---------- */
.bb-grad-text {
    background: var(--bb-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.bb-muted {
    color: var(--bb-text-3);
}

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

/* ---------- Layout ---------- */
.container-wide,
.bb-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--bb-gutter);
}

.bb-section {
    padding: clamp(56px, 8vw, 96px) 0;
}

.bb-section--alt {
    background: var(--bb-surface);
}

/* Section headers */
.bb-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(36px, 5vw, 56px);
}

.bb-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--bb-radius-pill);
    background: linear-gradient(135deg, rgba(86,128,233,0.12), rgba(136,96,208,0.12));
    color: var(--bb-primary-dark);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.4px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.bb-section-header h1,
.bb-section-header h2 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 10px;
}

.bb-section-header p {
    color: var(--bb-text-2);
    font-size: clamp(15px, 2vw, 17px);
}

/* ---------- Utilities ---------- */
.d-none { display: none !important; }
.d-inline-block { display: inline-block !important; }

.bb-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.bb-col-4 { grid-column: span 4; }
.bb-col-6 { grid-column: span 6; }
.bb-col-8 { grid-column: span 8; }
.bb-col-3 { grid-column: span 3; }

@media (max-width: 992px) {
    .bb-col-4 { grid-column: span 6; }
    .bb-col-3 { grid-column: span 6; }
}
@media (max-width: 640px) {
    .bb-col-4, .bb-col-3, .bb-col-6 { grid-column: span 12; }
}

/* Spinner */
.bb-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(86, 128, 233, 0.2);
    border-top-color: var(--bb-primary);
    border-radius: 50%;
    animation: bb-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes bb-spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.bb-skeleton {
    position: relative;
    overflow: hidden;
    background: #E8EDF8;
    border-radius: var(--bb-radius);
    min-height: 16px;
}
.bb-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent);
    animation: bb-shimmer 1.4s infinite;
}
@keyframes bb-shimmer {
    100% { transform: translateX(100%); }
}

/* ---------- Floating shapes ---------- */
.bb-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    opacity: 0.55;
    animation: bb-float 9s ease-in-out infinite;
}
.bb-shape--1 {
    width: 220px; height: 220px;
    background: radial-gradient(circle at 30% 30%, var(--bb-secondary), transparent 70%);
    top: -40px; left: -60px;
}
.bb-shape--2 {
    width: 160px; height: 160px;
    background: radial-gradient(circle at 30% 30%, var(--bb-purple), transparent 70%);
    top: 30%; right: -50px;
    animation-delay: -3s;
}
.bb-shape--3 {
    width: 120px; height: 120px;
    background: radial-gradient(circle at 30% 30%, var(--bb-accent), transparent 70%);
    bottom: -20px; left: 20%;
    animation-delay: -6s;
}
@keyframes bb-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-22px) rotate(6deg); }
}

/* ---------- Waves ---------- */
.bb-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 120px;
    line-height: 0;
    pointer-events: none;
}
.bb-waves svg {
    width: 100%;
    height: 100%;
}
.bb-waves path {
    fill: var(--bb-surface);
}

/* ---------- Scroll reveal base ---------- */
[data-anim],
[data-anim-group] > * {
    will-change: transform, opacity;
}

/* ---------- Ripple ---------- */
.bb-ripple {
    position: relative;
    overflow: hidden;
}
.bb-ripple .bb-ripple-ink {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0);
    animation: bb-ripple 0.65s linear;
    pointer-events: none;
}
@keyframes bb-ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ---------- Scroll progress ---------- */
#bbScrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0;
    z-index: 1200;
    background: var(--bb-gradient);
    border-radius: 0 4px 4px 0;
    transition: width 0.08s linear;
}

/* ---------- Back to top ---------- */
#bbBackTop {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--bb-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bb-shadow-primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all var(--bb-transition);
}
#bbBackTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#bbBackTop:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(86, 128, 233, 0.45);
}
#bbBackTop svg {
    width: 20px;
    height: 20px;
}

/* ---------- Toast ---------- */
#bbToastWrap {
    position: fixed;
    top: 86px;
    right: 18px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
}
.bb-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--bb-radius);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bb-border);
    box-shadow: var(--bb-shadow);
    animation: bb-toast-in 0.35s cubic-bezier(0.21, 1.02, 0.73, 1);
    transition: all 0.35s ease;
}
.bb-toast.leaving {
    opacity: 0;
    transform: translateX(40px);
}
.bb-toast--success { border-left: 4px solid var(--bb-success); }
.bb-toast--error { border-left: 4px solid var(--bb-danger); }
.bb-toast--info { border-left: 4px solid var(--bb-primary); }
.bb-toast--warning { border-left: 4px solid var(--bb-warning); }
.bb-toast__icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.bb-toast--success .bb-toast__icon { background: var(--bb-success); }
.bb-toast--error .bb-toast__icon { background: var(--bb-danger); }
.bb-toast--info .bb-toast__icon { background: var(--bb-primary); }
.bb-toast--warning .bb-toast__icon { background: var(--bb-warning); }
.bb-toast__title { font-weight: 700; font-size: 14px; color: var(--bb-text); }
.bb-toast__msg { font-size: 13px; color: var(--bb-text-2); }
@keyframes bb-toast-in {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Success tick animation */
.bb-tick-wrap {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    background: rgba(30, 42, 74, 0.45);
    backdrop-filter: blur(6px);
}
.bb-tick-wrap.show { display: flex; }
.bb-tick {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--bb-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(86, 128, 233, 0.5);
    animation: bb-tick-pop 0.45s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    transform: scale(0);
}
.bb-tick svg {
    width: 44px;
    height: 44px;
    stroke: #fff;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: bb-tick-draw 0.5s 0.25s ease forwards;
}
@keyframes bb-tick-pop {
    to { transform: scale(1); }
}
@keyframes bb-tick-draw {
    to { stroke-dashoffset: 0; }
}

/* ---------- Page transition overlay ---------- */
#bbPageOverlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: var(--bb-gradient);
    transform: translateY(100%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
#bbPageOverlay.active { transform: translateY(0); }
#bbPageOverlay::after {
    content: '';
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    animation: bb-spin 0.8s linear infinite;
    opacity: 0;
}
#bbPageOverlay.active::after { opacity: 1; }


/* ---------- Global typography: Hind Siliguri everywhere ---------- */
html, body,
h1, h2, h3, h4, h5, h6,
p, span, a, li, td, th, label, small, strong, em,
button, input, select, textarea, kbd {
    font-family: 'Hind Siliguri', sans-serif;
}
