/* OnSkilliT design system — tokens first; every colour below comes from these variables. */
:root {
  --navy-900: #0b1b3a;
  --blue-600: #2f6bff;
  --blue-500: #4a7fff;
  --cyan-500: #14c8e0;
  --violet-500: #7c5cff;

  --bg: #ffffff;
  --bg-soft: #f3f6fb;
  --surface: #ffffff;
  --text: #0f1a30;
  --text-muted: #55627a;
  --border: #dfe5f0;
  --primary: #1f55e0;       /* AA on white */
  --primary-contrast: #ffffff;
  --accent: #0aa9c0;
  --ring: #2f6bff;
  --danger: #c0262d;
  --ok: #0f8a4f;
  --shadow: 0 1px 2px rgba(11,27,58,.06), 0 8px 24px rgba(11,27,58,.08);
  --grad: linear-gradient(135deg, var(--blue-600), var(--cyan-500));
  --grad-soft: radial-gradient(1200px 500px at 80% -10%, rgba(47,107,255,.14), transparent 60%),
               radial-gradient(900px 400px at 0% 0%, rgba(20,200,224,.12), transparent 55%);

  --radius: 14px;
  --font: 'Inter', 'Noto Sans Bengali', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container: 1160px;
}

:root[data-theme='dark'] {
  --bg: #0a1224;
  --bg-soft: #0e1830;
  --surface: #111e3a;
  --text: #eaf0ff;
  --text-muted: #9fb0cf;
  --border: #223156;
  --primary: #5b8dff;       /* AA on dark surface */
  --primary-contrast: #07102a;
  --accent: #34d6ea;
  --ring: #7aa2ff;
  --danger: #ff7a80;
  --ok: #4fd18f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --grad-soft: radial-gradient(1200px 500px at 80% -10%, rgba(91,141,255,.22), transparent 60%),
               radial-gradient(900px 400px at 0% 0%, rgba(52,214,234,.14), transparent 55%);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
html[data-theme='dark'] { color-scheme: dark; }
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease !important;
}

body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html[lang='bn'] body { line-height: 1.8; }
img, svg { max-width: 100%; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
html[lang='bn'] h1, html[lang='bn'] h2, html[lang='bn'] h3 { line-height: 1.4; letter-spacing: 0; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--primary-contrast); padding: .5rem 1rem; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand b { color: var(--primary); font-weight: 800; }
.primary-nav { display: none; }
.primary-nav a { color: var(--text); text-decoration: none; padding: .5rem .75rem; border-radius: 8px; font-weight: 500; }
.primary-nav a:hover { background: var(--bg-soft); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav-toggle { order: 3; }
.nav-actions-desktop { display: none; gap: 8px; }
.nav-actions-mobile { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.primary-nav.open { display: flex; flex-direction: column; position: absolute; inset: 64px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 16px 20px; box-shadow: var(--shadow); }

.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--primary); }
.theme-toggle .i-moon { display: none; }
:root[data-theme='dark'] .theme-toggle .i-sun { display: none; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: block; }

.lang-switch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 0 10px; height: 44px; font-weight: 600; font-size: .9rem; }
.lang-switch a { color: var(--text-muted); text-decoration: none; padding: 6px 2px; }
.lang-switch a[aria-current='true'] { color: var(--primary); }
.lang-switch span { color: var(--border); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: .6rem 1.2rem; border-radius: 10px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-contrast); box-shadow: 0 6px 18px rgba(31,85,224,.28); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-block { width: 100%; }

/* Hero */
.hero { background: var(--grad-soft), var(--bg); padding: 56px 0 72px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 800; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.mock-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-card { background: var(--bg-soft); border-radius: 10px; padding: 12px; }
.mock-card b { display: block; font-size: 1.2rem; }
.mock-card span { font-size: .75rem; color: var(--text-muted); }
.mock-chart { margin-top: 10px; height: 110px; border-radius: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--blue-600) 22%, transparent), transparent); position: relative; overflow: hidden; }
.mock-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tag-demo { display: inline-block; margin-top: 10px; font-size: .75rem; color: var(--text-muted); }

/* Sections & cards */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--text-muted); margin: 0; }

/* Forms / auth */
.auth-wrap { min-height: calc(100vh - 64px - 120px); display: grid; place-items: center; padding: 32px 0; background: var(--grad-soft), var(--bg); }
.auth-card { width: min(100% - 32px, 440px); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type='text'], .field input[type='email'], .field input[type='password'] {
  width: 100%; min-height: 46px; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit;
}
.field input:focus { border-color: var(--primary); }
.field .hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.error { color: var(--danger); font-size: .875rem; margin-top: 4px; }
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border: 1px solid var(--ok); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: .9rem; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.page-pad { padding: 40px 0 64px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 28px 0; }
.footer-row { display: grid; gap: 16px; }

@media (min-width: 720px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-row { grid-template-columns: 1fr auto; }
}
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .primary-nav, .primary-nav.open { display: flex; position: static; flex-direction: row; background: none; border: 0; box-shadow: none; padding: 0; margin-inline-start: 16px; gap: 4px; }
  .nav-actions-mobile { display: none; }
  .nav-actions-desktop { display: flex; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .hero { padding: 88px 0 104px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .mock { animation: float 6s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
}

/* ---- Shared app components (admin panels, LMS, SaaS) ---- */
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.admin-nav a { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 500; background: var(--surface); }
.admin-nav a[aria-current='page'], .admin-nav a:hover { border-color: var(--primary); color: var(--primary); }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: start; padding: .65rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; border: 1px solid var(--border); color: var(--text-muted); }
.badge.ok { color: var(--ok); border-color: var(--ok); }
.badge.bad { color: var(--danger); border-color: var(--danger); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.field input[type='number'], .field input[type='url'], .field input[type='datetime-local'], .field input[type='color'], .field select, .field textarea {
  width: 100%; min-height: 44px; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input[type='color'] { padding: 2px; height: 44px; }
.stat { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.progress { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; border: 1px solid var(--border); }
.progress > span { display: block; height: 100%; background: var(--grad); }
.price { font-size: 2rem; font-weight: 800; }
.plan.selected, .plan:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.plan label { cursor: pointer; display: block; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: .5rem 0; border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.inline-form { display: inline; }
.btn-sm { min-height: 34px; padding: .25rem .7rem; font-size: .875rem; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose { max-width: 70ch; white-space: pre-line; }
.cert { border: 6px double var(--primary); padding: 40px 24px; text-align: center; background: var(--surface); border-radius: 12px; }
.cert h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); }
.mt { margin-top: 20px; }
@media print { .site-header, .site-footer, .no-print { display: none !important; } body { background: #fff; color: #000; } }
.status-line { margin-bottom: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
fieldset.panel { margin-inline: 0; }

/* certificate designs */
.cert-modern { border: 0; border-top: 18px solid var(--primary); border-radius: 8px; box-shadow: var(--shadow); }
.cert-minimal { border: 1px solid var(--border); }
.cert .signature { margin-top: 28px; } .cert .signature span { display: inline-block; border-top: 1px solid var(--text-muted); padding-top: 6px; min-width: 200px; font-style: italic; }

.drag-handle { cursor: grab; user-select: none; color: var(--text-muted); padding: 0 .35rem; font-size: 1.1rem; }
.dragging { opacity: .45; }
