:root {
  --bg: #0b0f1e;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #eef1ff;
  --muted: #a3aac8;
  --a: #7c5cff;
  --b: #00d4c8;
  --c: #ff5c8a;
  --ok: #2ee59d;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  background: radial-gradient(1200px 700px at 80% -10%, #2a1d6b 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 40%, #053c4a 0%, transparent 60%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
.bn { font-family: "Noto Sans Bengali", sans-serif; }
#bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 5vw;
  background: rgba(11, 15, 30, 0.65);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-border);
}
.logo { color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.logo b { color: var(--b); }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); animation: pulse 2s infinite; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .92rem; position: relative; transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0; background: var(--b); transition: width .3s; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--panel-border);
  background: var(--panel); color: var(--text); font-size: 1.2rem; cursor: pointer;
  transition: transform .2s, background .2s;
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 .95rem "Poppins", sans-serif; text-decoration: none; color: var(--text);
  transition: transform .2s, box-shadow .3s, background .3s;
}
.btn.primary { background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 8px 30px rgba(124, 92, 255, .4); }
.btn.primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0, 212, 200, .45); }
.btn.ghost { background: var(--panel); border: 1px solid var(--panel-border); }
.btn.ghost:hover { transform: translateY(-3px); background: rgba(255,255,255,.12); }
.btn.small { padding: 7px 14px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- HERO ---------- */
.hero {
  min-height: calc(100vh - 70px);
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px;
  padding: 40px 5vw 60px;
}
.eyebrow { color: var(--b); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: 14px; }
h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1.12; font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--a), var(--b), var(--c), var(--a)); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradmove 6s linear infinite; }
.typed { color: var(--b); }
.caret { color: var(--b); animation: blink 1s steps(1) infinite; font-weight: 400; }
.lead { color: var(--muted); font-size: 1.08rem; margin: 18px 0 28px; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.stats { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }
.stat { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 14px 22px; min-width: 120px; }
.stat b { font-size: 1.8rem; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .82rem; }

.hero-photo { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 480px; width: 100%; justify-self: center; }
.photo-wrap {
  width: 68%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; position: relative; z-index: 2;
  border: 4px solid rgba(255,255,255,.15);
  box-shadow: 0 0 0 10px rgba(124,92,255,.12), 0 30px 80px rgba(0,0,0,.5);
  animation: float 6s ease-in-out infinite;
}
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 30%; transform: scale(1.7); transform-origin: 52% 48%; }
.ring { position: absolute; border-radius: 50%; border: 2px dashed rgba(0, 212, 200, .35); }
.ring.r1 { width: 84%; aspect-ratio: 1; animation: spin 30s linear infinite; }
.ring.r2 { width: 100%; aspect-ratio: 1; border: 2px solid transparent; border-top-color: var(--a); border-right-color: var(--c); animation: spin 8s linear infinite reverse; }
.orbit { position: absolute; inset: 0; z-index: 3; }
.chip {
  position: absolute; padding: 8px 14px; border-radius: 999px; font-size: .82rem; font-weight: 500; white-space: nowrap;
  background: rgba(20, 24, 48, .85); border: 1px solid var(--panel-border); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  animation: bob 4s ease-in-out infinite;
}
.chip.c1 { top: 8%; left: 2%; }
.chip.c2 { top: 14%; right: 0; animation-delay: -1s; }
.chip.c3 { bottom: 16%; left: -4%; animation-delay: -2s; }
.chip.c4 { bottom: 6%; right: 4%; animation-delay: -3s; }
.wave { position: absolute; bottom: -6%; display: flex; gap: 5px; align-items: center; height: 40px; z-index: 3; }
.wave i { width: 5px; border-radius: 4px; background: linear-gradient(var(--b), var(--a)); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-duration: .9s; }
.wave i:nth-child(3n) { animation-duration: 1.3s; }
.wave i:nth-child(1) { animation-delay: -.1s } .wave i:nth-child(2) { animation-delay: -.3s }
.wave i:nth-child(3) { animation-delay: -.5s } .wave i:nth-child(4) { animation-delay: -.7s }
.wave i:nth-child(5) { animation-delay: -.2s } .wave i:nth-child(6) { animation-delay: -.6s }
.wave i:nth-child(7) { animation-delay: -.4s } .wave i:nth-child(8) { animation-delay: -.8s }
.wave i:nth-child(9) { animation-delay: -.15s } .wave i:nth-child(10) { animation-delay: -.45s }
.wave i:nth-child(11) { animation-delay: -.65s } .wave i:nth-child(12) { animation-delay: -.25s }

/* ---------- DAY BAR ---------- */
.daybar {
  position: sticky; top: 69px; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  margin: 0 5vw; padding: 14px 18px; border-radius: var(--radius);
  background: rgba(20, 24, 48, .8); border: 1px solid var(--panel-border); backdrop-filter: blur(14px);
}
.daybar-mid { flex: 1; min-width: 0; }
.day-title { font-weight: 600; }
.day-title #dayTheme { color: var(--b); }
.progress { height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--a), var(--b), var(--ok)); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.day-sub { color: var(--muted); font-size: .8rem; }

/* ---------- SECTIONS ---------- */
.section { padding: 80px 5vw 20px; scroll-margin-top: 150px; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); display: flex; align-items: center; gap: 14px; }
.section-head p { color: var(--muted); max-width: 680px; }
.num { font-size: .9rem; padding: 4px 10px; border-radius: 10px; background: linear-gradient(135deg, var(--a), var(--b)); }
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 26px; }
.panel h3 { margin-bottom: 10px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.muted { color: var(--muted); }

/* ---------- FLASHCARDS ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { perspective: 1000px; height: 210px; cursor: pointer; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.3,1.4,.5,1); transform-style: preserve-3d; }
.card.flipped .card-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column;
  border: 1px solid var(--panel-border);
}
.front { background: linear-gradient(160deg, rgba(124,92,255,.22), rgba(0,212,200,.08)); justify-content: center; align-items: center; text-align: center; }
.back { background: linear-gradient(160deg, rgba(0,212,200,.2), rgba(255,92,138,.1)); transform: rotateY(180deg); gap: 6px; font-size: .88rem; }
.front .w { font-size: 1.45rem; font-weight: 700; }
.front .idx { position: absolute; top: 12px; left: 16px; color: var(--muted); font-size: .75rem; }
.front .hint { color: var(--muted); font-size: .75rem; margin-top: 6px; }
.back .m { font-weight: 500; }
.back .bn { color: #ffd76a; }
.back .ex { color: var(--muted); font-style: italic; }
.card-tools { position: absolute; bottom: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.mini {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--panel-border);
  background: rgba(0,0,0,.25); color: var(--text); cursor: pointer; font-size: .95rem;
  transition: transform .15s, background .2s;
}
.mini:hover { transform: scale(1.1); }
.mini.done { background: var(--ok); color: #05261a; border-color: var(--ok); }
.card.learned .front { box-shadow: inset 0 0 0 2px var(--ok); }
.card.learned .front::after { content: "✓ learned"; position: absolute; top: 12px; right: 14px; font-size: .72rem; color: var(--ok); font-weight: 600; }

/* ---------- SENTENCES ---------- */
.sentence-list { display: grid; gap: 14px; }
.sentence {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px 20px;
  transition: transform .25s, border-color .3s;
}
.sentence:hover { transform: translateX(6px); border-color: rgba(0,212,200,.5); }
.sentence.done { border-color: var(--ok); }
.s-num { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: rgba(124,92,255,.25); }
.sentence.done .s-num { background: var(--ok); color: #05261a; }
.tag { display: inline-block; font-size: .7rem; padding: 2px 10px; border-radius: 99px; background: rgba(0,212,200,.15); color: var(--b); margin-bottom: 4px; }
.s-en { font-weight: 500; font-size: 1.02rem; }
.s-bn { color: #ffd76a; font-size: .9rem; }
.s-score { font-size: .82rem; margin-top: 4px; min-height: 1em; }
.s-score .heard { color: var(--muted); }
.s-tools { display: flex; gap: 8px; }
.mini.rec { animation: recpulse 1s infinite; background: var(--c); }

/* ---------- QUIZ ---------- */
.quiz-q { font-size: 1.2rem; font-weight: 500; margin: 8px 0 18px; }
.quiz-top { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.opt {
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--panel-border); background: rgba(255,255,255,.04);
  color: var(--text); font: 500 1rem "Poppins", sans-serif; cursor: pointer; text-align: left;
  transition: transform .15s, background .2s, border-color .2s;
}
.opt:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--b); }
.opt.right { background: rgba(46,229,157,.2); border-color: var(--ok); animation: pop .4s; }
.opt.wrong { background: rgba(255,92,138,.2); border-color: var(--c); animation: shake .4s; }
.quiz-result { text-align: center; }
.quiz-result .big { font-size: 3rem; font-weight: 800; }

/* ---------- PHONE ---------- */
.phone { max-width: 720px; margin: 0 auto; background: rgba(15, 19, 40, .85); border: 1px solid var(--panel-border); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(0,212,200,.2)); }
.caller { display: flex; gap: 12px; align-items: center; }
.caller small { display: block; color: var(--muted); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255,255,255,.12); }
.phone.live .avatar { animation: ringpulse 1.5s infinite; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.chat { padding: 20px; min-height: 160px; max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 80%; padding: 12px 16px; border-radius: 18px; animation: bubbleIn .45s cubic-bezier(.2,1.4,.4,1); }
.bubble.them { background: rgba(255,255,255,.08); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.me { background: linear-gradient(135deg, var(--a), #5a3fe0); border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble.tip { align-self: center; max-width: 92%; font-size: .85rem; background: rgba(255, 215, 106, .12); border: 1px dashed rgba(255, 215, 106, .5); color: #ffe39a; }
.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
.replies { display: grid; gap: 10px; padding: 0 20px; }
.reply { text-align: left; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--panel-border); background: rgba(255,255,255,.04); color: var(--text); font: .93rem "Poppins", sans-serif; cursor: pointer; transition: transform .15s, border-color .2s; animation: fadeUp .4s both; }
.reply:hover { transform: translateX(4px); border-color: var(--b); }
.reply.wrong { border-color: var(--c); animation: shake .4s; }
.phone-actions { padding: 18px 20px 22px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- BRIEF ---------- */
.brief-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.topic-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.topic { font-size: 1.35rem; font-weight: 600; margin: 6px 0 16px; min-height: 2.2em; }
.topic.flash { animation: fadeUp .5s; }
.brief-timer { position: relative; width: 120px; height: 120px; margin: 0 auto; }
.brief-timer svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.brief-timer circle { fill: none; stroke-width: 9; }
.brief-timer .track { stroke: rgba(255,255,255,.08); }
.brief-timer .bar { stroke: var(--b); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke .3s; }
.brief-timer span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
.transcript { margin-top: 16px; min-height: 60px; padding: 12px; border-radius: 12px; background: rgba(0,0,0,.2); color: var(--muted); font-size: .92rem; }
.brief-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.brief-stats .stat { min-width: 100px; padding: 10px 16px; }
.brief-stats .stat b { font-size: 1.4rem; }
.prep { padding-left: 20px; margin-bottom: 18px; color: var(--muted); }
.prep li { margin: 6px 0; }
.prep b { color: var(--b); }
.phrases { display: flex; flex-wrap: wrap; gap: 8px; }
.phrases button { border: 1px solid var(--panel-border); background: rgba(255,255,255,.05); color: var(--text); padding: 6px 12px; border-radius: 99px; cursor: pointer; font: .82rem "Poppins", sans-serif; transition: background .2s; }
.phrases button:hover { background: rgba(0,212,200,.2); }

/* ---------- MISC ---------- */
.footer { text-align: center; padding: 60px 5vw 40px; color: var(--muted); }
dialog { margin: auto; border: 1px solid var(--panel-border); border-radius: var(--radius); background: #141832; color: var(--text); padding: 26px; width: min(420px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
dialog label { display: block; margin-top: 14px; font-size: .9rem; color: var(--muted); }
dialog input:not([type=range]) { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--panel-border); background: rgba(255,255,255,.06); color: var(--text); font: 1rem "Poppins", sans-serif; }
dialog input[type=range] { width: 100%; accent-color: var(--b); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 120px); background: #1d2246; border: 1px solid var(--panel-border); padding: 12px 22px; border-radius: 99px; transition: transform .4s cubic-bezier(.2,1.4,.4,1); z-index: 100; max-width: 90vw; text-align: center; }
.toast.show { transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.confetto { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.cards .card { opacity: 0; transform: translateY(30px) scale(.96); transition: opacity .5s ease, transform .5s ease; }
.cards .card.in { opacity: 1; transform: none; }

/* ---------- KEYFRAMES ---------- */
@keyframes gradmove { to { background-position: 300% 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-12px) rotate(-2deg); } }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 38px; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,200,.6); } 50% { box-shadow: 0 0 0 8px rgba(0,212,200,0); } }
@keyframes recpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,92,138,.7); } 50% { box-shadow: 0 0 0 10px rgba(255,92,138,0); } }
@keyframes ringpulse { 0% { box-shadow: 0 0 0 0 rgba(46,229,157,.6); } 100% { box-shadow: 0 0 0 16px rgba(46,229,157,0); } }
@keyframes pop { 50% { transform: scale(1.05); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(14px) scale(.9); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .4; } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 30px; }
  .hero-photo { order: -1; max-width: 340px; }
  .lead { margin-inline: auto; }
  .hero-cta, .stats { justify-content: center; }
  .brief-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .nav, .hero, .section { padding-left: 16px; padding-right: 16px; }
  .daybar { margin: 0 16px; top: 69px; }
  .sentence { grid-template-columns: 1fr; }
  .s-num { display: none; }
  .options { grid-template-columns: 1fr; }
  .chip { font-size: .72rem; padding: 6px 10px; }
  .chip.c3 { left: 0; }
  .stat { min-width: 0; flex: 1; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
