/* ==========================================================
   Index / landing + bookshelf browser — "পড়াশোনা"
   Theme: warm home library — cream paper, wooden shelves, ink & saffron
   ========================================================== */
:root {
  --paper: #fbf4e6;
  --paper-2: #f3e6cc;
  --ink: #23201c;
  --ink-2: #5d564c;
  --wood: #9a6533;
  --wood-d: #6e4521;
  --wood-l: #c08a52;
  --teal: #0f766e;
  --saffron: #f59e0b;
  --berry: #be123c;
  --shadow: 0 18px 40px -18px rgba(60, 35, 10, .45);
}
body { background: var(--paper); color: var(--ink); }
.muted { color: var(--ink-2); }
.small { font-size: var(--fs-sm); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--saffron); padding: .5rem 1rem; border-radius: 8px; z-index: 2000; color: var(--ink); }
.skip:focus { left: 8px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(251, 244, 230, .9); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(110, 69, 33, .2); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .55rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand .ic { width: 2rem; height: 2rem; }
.nav-links { display: flex; gap: 1.2rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.nav-links a:hover { color: var(--teal); }
.nav-cta { background: var(--ink); color: #fff !important; padding: .35rem 1rem; border-radius: 999px; }
@media (max-width: 640px) { .nav-links li:not(:last-child):not(.keep) { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.5rem; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-main { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -10px var(--teal); }
.btn-ghost { border: 2px solid var(--ink); color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding-block: var(--sp-8) var(--sp-7); overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; inset: auto -10% -40% 30%; height: 70%; background: radial-gradient(closest-side, rgba(245, 158, 11, .18), transparent); pointer-events: none; }
.hero-grid { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.kicker { color: var(--teal); font-weight: 700; margin-bottom: var(--sp-3); }
.hero h1 { font-size: var(--fs-3xl); line-height: 1.2; }
.hl { position: relative; color: var(--berry); white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .22em; height: .28em; background: rgba(245, 158, 11, .45); z-index: -1; border-radius: 4px; transform: skewX(-12deg); }
.lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: var(--sp-5) 0; }
.stats { display: flex; flex-wrap: wrap; gap: 1.6rem; list-style: none; padding: 0; margin: 0; }
.stats li { display: flex; align-items: baseline; gap: .3rem; }
.stats b { font-size: var(--fs-xl); color: var(--teal); }

.hero-art { position: relative; min-height: 360px; display: grid; align-items: end; }
.hero-shelf { position: relative; padding: 0 1rem; }
.spines { display: flex; align-items: flex-end; gap: 4px; height: 280px; padding-left: 8px; }
.spine { position: relative; border-radius: 4px 4px 2px 2px; box-shadow: inset -6px 0 0 rgba(0, 0, 0, .15), inset 3px 0 0 rgba(255, 255, 255, .25); display: grid; justify-items: center; align-content: space-between; padding: 10px 0; color: #fff; animation: rise .7s cubic-bezier(.3, 1.4, .5, 1) both; transform-origin: bottom; }
.spine::before, .spine::after { content: ""; width: 70%; height: 3px; background: rgba(255, 255, 255, .55); border-radius: 2px; }
.spine .ic { width: 70%; height: auto; aspect-ratio: 1; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .3)); }
.spine.tilt { transform: rotate(-7deg); transform-origin: bottom left; margin-left: 10px; }
@keyframes rise { from { transform: translateY(40px) scaleY(.6); opacity: 0; } }
.feature-book { position: absolute; right: 6%; bottom: 22px; width: 42%; max-width: 210px; transform: rotate(6deg); transform-origin: bottom right; animation: lean 6s ease-in-out infinite; }
.feature-book img { width: 100%; height: auto; border-radius: 3px 8px 8px 3px; box-shadow: -10px 14px 24px -8px rgba(60, 35, 10, .55), inset 0 0 0 1px rgba(0, 0, 0, .1); }
@keyframes lean { 50% { transform: rotate(3deg) translateY(-6px); } }
.board { height: 22px; margin: 0 -1rem; border-radius: 4px; background: linear-gradient(var(--wood-l), var(--wood) 55%, var(--wood-d)); box-shadow: 0 14px 20px -10px rgba(60, 35, 10, .6); }
.float { position: absolute; width: 4.2rem; height: 4.2rem; display: grid; place-items: center; background: #fff; border-radius: 22px; box-shadow: var(--shadow); animation: float 5s ease-in-out infinite; z-index: 2; }
.float .ic { width: 2.6rem; height: 2.6rem; }
.f1 { top: 0; left: 4%; } .f2 { top: 6%; right: 8%; animation-delay: -1.5s; } .f3 { top: 34%; left: 38%; animation-delay: -3s; } .f4 { top: 40%; right: -2%; animation-delay: -2.2s; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-4deg); } }
@media (max-width: 600px) { .spines { height: 220px; } .float { width: 3.2rem; height: 3.2rem; } .float .ic { width: 2rem; height: 2rem; } .f3 { display: none; } }

/* ---------- generic blocks ---------- */
.block { padding-block: var(--sp-8); }
.block-alt { background: var(--paper-2); }
.block h2, .shelf-sec h2 { font-size: var(--fs-2xl); }
.eyebrow { display: inline-block; font-weight: 700; color: var(--berry); margin-bottom: .2rem; letter-spacing: .02em; }
.eyebrow.light { color: #ffd58a; }
.sub { color: var(--ink-2); font-size: var(--fs-lg); }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

.steps { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.step { position: relative; background: #fff; border-radius: 24px; padding: 1.6rem 1.4rem; box-shadow: var(--shadow); }
.step h3 { margin: .6rem 0 .2rem; font-size: var(--fs-lg); }
.step p { margin: 0; color: var(--ink-2); }
.step-n { position: absolute; top: -14px; right: 18px; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--saffron); font-weight: 800; font-size: 1.2rem; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4); }
.step .ic-xl { width: 4rem; height: 4rem; }

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin-top: var(--sp-6); }
.feat { background: #fff; border-radius: 22px; padding: 1.3rem; border-top: 6px solid var(--c); box-shadow: var(--shadow); transition: transform .25s; }
.feat:hover { transform: translateY(-5px) rotate(-.6deg); }
.feat h3 { margin: .5rem 0 .2rem; font-size: var(--fs-lg); }
.feat p { margin: 0; color: var(--ink-2); line-height: 1.7; }

.featured { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); margin-top: var(--sp-5); }
.lesson-card { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; background: #fff; border-radius: 22px; padding: 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .25s; }
.lesson-card:hover { transform: translateY(-4px); }
.lesson-card img { width: 96px; border-radius: 4px 8px 8px 4px; box-shadow: -4px 6px 12px -4px rgba(0, 0, 0, .4); }
.lesson-card small { color: var(--teal); font-weight: 700; }
.lesson-card h3 { margin: .1rem 0; font-size: var(--fs-lg); }
.lesson-card p { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); line-height: 1.6; }
.lesson-card .go { color: var(--berry); font-weight: 700; font-size: var(--fs-sm); }

/* ---------- bookshelf section ---------- */
.shelf-sec { padding-block: var(--sp-8); color: #fff; scroll-margin-top: 56px;
  background: linear-gradient(180deg, #4a2d14, #3a230f);
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 3px, transparent 3px 11px), linear-gradient(180deg, #4a2d14, #3a230f); }
.shelf-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: var(--sp-6); }
.shelf-head h2 { margin: 0; color: #fff; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: var(--fs-sm); }
.crumbs a, .crumbs span { color: #ffe7bf; text-decoration: none; padding: .2rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.crumbs a:hover { background: rgba(255, 255, 255, .18); }
.crumbs [aria-current] { background: var(--saffron); color: var(--ink); font-weight: 700; }
.crumbs .sep { background: none; padding: 0; opacity: .6; }
.shelf-view { min-height: 420px; }
.view-title { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.view-title h3 { margin: 0; font-size: var(--fs-xl); color: #fff; }
.view-note { color: #ffe7bf; font-size: var(--fs-sm); background: rgba(255, 255, 255, .08); border-radius: 999px; padding: .1rem .8rem; }
.back { color: #ffe7bf; text-decoration: none; font-weight: 700; border: 2px solid rgba(255, 231, 191, .5); border-radius: 999px; padding: .2rem .9rem; font-size: var(--fs-sm); }
.back:hover { background: rgba(255, 255, 255, .1); }

/* shared shelf grid: every slot carries its own board piece so rows form a continuous shelf */
.shelf-grid { display: grid; column-gap: 0; row-gap: 3rem; list-style: none; margin: 0; padding: 0; }
.shelf-grid > li { position: relative; display: grid; justify-items: center; align-items: end; padding: 0 .6rem 22px; }
.shelf-grid > li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: linear-gradient(var(--wood-l), var(--wood) 55%, var(--wood-d)); box-shadow: 0 16px 18px -10px rgba(0, 0, 0, .6); }
.shelf-grid > li:first-child::after { border-radius: 6px 0 0 6px; }
.shelf-grid > li:last-child::after { border-radius: 0 6px 6px 0; }

/* classes */
.class-grid { grid-template-columns: repeat(auto-fill, minmax(min(170px, 50%), 1fr)); }
.class-grid > li { padding-inline: 1.2rem; }
.class-box { display: grid; justify-items: center; gap: .5rem; text-decoration: none; color: #fff; width: 100%; padding-top: .6rem; }
.class-box .set { display: flex; align-items: flex-end; gap: 3px; height: 150px; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.class-box .set i { display: block; width: 18px; border-radius: 3px 3px 1px 1px; box-shadow: inset -4px 0 0 rgba(0, 0, 0, .18), inset 2px 0 0 rgba(255, 255, 255, .25); }
.class-box .set i:nth-child(odd) { width: 22px; }
.class-box:hover .set, .class-box:focus-visible .set { transform: translateY(-10px); }
.class-box .plate { position: relative; z-index: 1; background: linear-gradient(#f7e3bd, #e6c48f); color: var(--ink); border-radius: 10px; padding: .25rem .9rem .35rem; text-align: center; box-shadow: 0 4px 0 #a36d37; line-height: 1.35; margin-bottom: -8px; }
.class-box .plate b { display: block; font-size: 1.05rem; }
.class-box .plate small { color: var(--ink-2); font-size: .78rem; }
.ready-dot { position: absolute; top: 0; right: 10px; background: var(--saffron); color: var(--ink); font-weight: 800; font-size: .75rem; border-radius: 999px; padding: .05rem .55rem; box-shadow: 0 4px 10px -4px #000; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* books */
.book-grid { grid-template-columns: repeat(auto-fill, minmax(min(160px, 50%), 1fr)); }
.book-link { position: relative; display: grid; justify-items: center; gap: .5rem; text-decoration: none; color: #fff; width: 100%; padding-top: .8rem; perspective: 800px; }
.cover { position: relative; width: 132px; aspect-ratio: 505 / 640; border-radius: 3px 8px 8px 3px; overflow: hidden; box-shadow: -8px 12px 22px -8px rgba(0, 0, 0, .7), inset 4px 0 0 rgba(0, 0, 0, .18); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); transform-origin: bottom left; animation: rise .6s cubic-bezier(.3, 1.4, .5, 1) both; }
.book-link:hover .cover, .book-link:focus-visible .cover { transform: translateY(-12px) rotateY(-14deg); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.ph { background: var(--c); display: grid; grid-template-rows: auto 1fr auto; color: #fff; text-align: center; }
.cover.ph::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .25), transparent 55%), repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px); pointer-events: none; }
.cover.ph .t { background: rgba(0, 0, 0, .22); padding: .45rem .4rem .35rem; font-weight: 800; font-size: .92rem; line-height: 1.35; }
.cover.ph .t small { display: block; font-weight: 500; font-size: .7rem; opacity: .9; }
.cover.ph .ic { width: 56px; height: 56px; align-self: center; justify-self: center; background: #fff; border-radius: 50%; padding: 8px; box-shadow: 0 6px 12px -6px #000; }
.cover.ph .soon { font-size: .68rem; background: rgba(0, 0, 0, .25); padding: .2rem; }
.book-link .name { font-size: .92rem; font-weight: 700; text-align: center; line-height: 1.4; color: #ffe7bf; min-height: 2.6em; margin-bottom: -6px; position: relative; z-index: 1; }
.book-link .badge { position: absolute; top: 0; right: 4px; z-index: 2; background: var(--saffron); color: var(--ink); font-weight: 800; font-size: .74rem; border-radius: 999px; padding: .05rem .55rem; box-shadow: 0 4px 10px -4px #000; }

/* open book */
.open-book { display: grid; background: #fffaf0; color: var(--ink); border-radius: 12px; box-shadow: 0 30px 60px -20px #000; overflow: hidden; animation: openBook .6s cubic-bezier(.3, 1.2, .5, 1); transform-origin: left center; }
@keyframes openBook { from { transform: perspective(1400px) rotateY(-35deg); opacity: 0; } }
@media (min-width: 860px) { .open-book { grid-template-columns: .8fr 1.2fr; } .open-book .left { border-right: 2px solid #e8d9bb; box-shadow: inset -24px 0 30px -24px rgba(0, 0, 0, .25); } }
.open-book .left { padding: clamp(1.2rem, 3vw, 2rem); display: grid; justify-items: center; align-content: start; gap: .8rem; text-align: center; background: linear-gradient(90deg, #fffaf0, #f7ecd6); }
.open-book .left .cover { width: 190px; animation: none; }
.open-book .left h3 { margin: 0; font-size: var(--fs-xl); }
.open-book .meta { color: var(--ink-2); font-size: var(--fs-sm); }
.progress { width: 100%; max-width: 260px; }
.progress .bar { height: 12px; border-radius: 99px; background: #eadcc0; overflow: hidden; }
.progress .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #34d399); border-radius: 99px; transition: width 1s ease; }
.progress small { display: block; margin-top: .3rem; color: var(--ink-2); }
.open-book .right { padding: clamp(1.2rem, 3vw, 2rem); background: repeating-linear-gradient(transparent 0 2.4rem, rgba(15, 118, 110, .08) 2.4rem calc(2.4rem + 1px)), #fffaf0; }
.open-book .right h4 { font-size: var(--fs-lg); margin-bottom: .8rem; }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.toc li a, .toc li > div { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: .7rem; align-items: center; padding: .55rem .7rem; border-radius: 12px; text-decoration: none; color: var(--ink); }
.toc .num { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: #eadcc0; font-weight: 800; font-size: .9rem; }
.toc .ready a { background: #fff; box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .5); border: 2px solid transparent; transition: border-color .2s, transform .2s; }
.toc .ready a:hover, .toc .ready a:focus-visible { border-color: var(--teal); transform: translateX(4px); }
.toc .ready .num { background: var(--teal); color: #fff; }
.toc .title { line-height: 1.45; }
.toc .title small { display: block; color: var(--ink-2); font-size: .82rem; }
.toc .pill { font-size: .78rem; border-radius: 999px; padding: .1rem .7rem; white-space: nowrap; }
.toc .ready .pill { background: var(--teal); color: #fff; }
.toc .soon > div { opacity: .62; }
.toc .soon .pill { background: #eadcc0; }
.empty { text-align: center; padding: 2rem 1rem; }
.empty .ic { width: 4rem; height: 4rem; }

/* ---------- parents + footer ---------- */
.parents { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .parents { grid-template-columns: 1.4fr .6fr; } }
.checks { list-style: none; padding: 0; display: grid; gap: .4rem; }
.parents-art { display: flex; justify-content: center; gap: .6rem; }
.parents-art .ic { width: 5rem; height: 5rem; background: #fff; border-radius: 26px; padding: .7rem; box-shadow: var(--shadow); animation: float 5s ease-in-out infinite; }
.parents-art .ic:nth-child(2) { animation-delay: -1.6s; } .parents-art .ic:nth-child(3) { animation-delay: -3.2s; }
.footer { background: var(--ink); color: #e8dcc5; padding-block: var(--sp-6); }
.footer p { margin: 0 0 .4rem; }
.footer .small { opacity: .75; }

@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }
