:root {
  --bg: #071023;
  --surface: #0e1c3d;
  --hero: #0e2352;
  --line: #14203f;
  --text: #eef3ff;
  --text-soft: #c9d4ee;
  --text-muted: #9fb3d9;
  --text-dim: #8b9cc4;
  --footer: #7f90b8;
  --nav-idle: #b7c4e6;
  --nav-active-bg: #1c2c52;
  --label: #7fa7e8;
  --sun: #f5a623;
  --sun-hover: #ffb93f;
  --sun-ink: #1c1300;
  --sky: #4a9eff;
  --sky-hover: #7fc0ff;
  --portrait-bg: #d9dde3;
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --font-bn: 'Hind Siliguri', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--sky-hover); }
h1, h2, p { margin: 0; font-weight: inherit; }
img { display: block; }
[hidden] { display: none !important; }

.app { min-height: 100vh; background: var(--bg); font-family: var(--font-body); color: var(--text); }
.bn { font-family: var(--font-bn); }

.lift { transition: transform .15s ease; }
.lift:hover { transform: translateY(-3px); }

/* Wordmark */
.wordmark { font-family: var(--font-display); font-weight: 800; line-height: 1; white-space: nowrap; }
.wordmark--nav { font-size: 26px; }
.wordmark--footer { font-size: 20px; }
.c-tara { color: var(--sun); }
.c-amp { color: var(--text); }
.c-friends { color: var(--sky); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 16, 35, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__text { display: flex; flex-direction: column; gap: 3px; }
.brand__tagline { font-family: var(--font-body); font-weight: 700; font-size: 12px; line-height: 1; color: var(--text-dim); white-space: nowrap; }
.nav__links { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; margin-left: auto; }
.nav__link {
  padding: 10px 14px; border-radius: 22px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; white-space: nowrap;
  color: var(--nav-idle); background: transparent;
}
.nav__link:hover { color: #fff; }
.nav__link.is-active { background: var(--nav-active-bg); color: #fff; }
.btn-subscribe {
  margin-left: -8px; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--sun); color: var(--sun-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  padding: 10px 20px; border-radius: 22px;
}
.btn-subscribe:hover { background: var(--sun-hover); color: var(--sun-ink); }

/* Sections */
.section { max-width: 1280px; margin: 0 auto; padding: 64px 32px 0; }
.section--hero { padding-top: 40px; }
.section--last { padding-bottom: 80px; }
.section--page { padding: 48px 32px 80px; }
.section__head {
  display: flex; align-items: end; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.h2 { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; }
.h2--spaced { margin-bottom: 24px; }
.see-all { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--sky); }

/* Buttons */
.btn {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 18px;
  border: none; border-radius: 28px; cursor: pointer; white-space: nowrap;
}
.btn--primary { background: var(--sun); color: var(--sun-ink); padding: 14px 30px; }
.btn--primary:hover { background: var(--sun-hover); color: var(--sun-ink); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.08); color: var(--text);
  border: 2px solid rgba(255, 255, 255, 0.25); padding: 12px 28px;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); color: var(--text); }

/* Hero */
.hero {
  border-radius: 32px; overflow: hidden; background: var(--hero);
  display: flex; flex-wrap: wrap-reverse; align-items: stretch;
}
.hero__text { flex: 1 1 380px; display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.hero__kicker { font-weight: 600; font-size: 18px; color: var(--sun); margin-bottom: 12px; }
.hero__title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02; margin-bottom: 18px; text-wrap: balance;
}
.hero__lead { font-size: 18px; color: var(--text-soft); line-height: 1.5; margin-bottom: 28px; text-wrap: pretty; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__art { flex: 1.6 1 520px; min-height: 300px; aspect-ratio: 16 / 9; position: relative; }
.hero__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }

/* Grids */
.grid { display: grid; }
.grid--topics { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid--latest { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid--friends { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.grid--videos { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.grid--worksheets { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

/* Topic tiles */
.topic {
  border-radius: 24px; padding: 24px; display: flex; align-items: center; gap: 16px; min-height: 96px;
}
.topic:hover { color: inherit; }
.topic__icon { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.35); flex-shrink: 0; }
.topic__icon img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.topic__label { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; }
.topic__bn { font-family: var(--font-bn); font-weight: 600; font-size: 16px; }

/* Video cards */
.video { cursor: pointer; color: var(--text); }
.video:hover { color: var(--text); }
.video__thumb { aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; position: relative; }
.video__char { position: absolute; right: 8%; bottom: 0; height: 92%; object-fit: contain; }
.video__cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video__play {
  position: absolute; left: 16px; top: 16px; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(7, 16, 35, 0.75); display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.video__dur {
  position: absolute; bottom: 12px; left: 14px; font-size: 13px; font-weight: 700; color: #fff;
  background: rgba(7, 16, 35, 0.75); padding: 3px 10px; border-radius: 8px;
}
.video__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-top: 12px; line-height: 1.2; }
.video__sub { color: var(--text-dim); font-size: 14px; margin-top: 2px; }

/* Worksheet cards */
.sheet { background: var(--surface); border-radius: 24px; padding: 14px 14px 20px; display: flex; flex-direction: column; }
.sheet__paper {
  background: #fff; border-radius: 16px; aspect-ratio: 4 / 3; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.sheet__paper img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sheet__body { padding: 14px 6px 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sheet__tag { align-self: flex-start; font-family: var(--font-display); font-weight: 700; font-size: 13px; padding: 2px 12px; border-radius: 12px; }
.sheet__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.2; margin-top: 6px; }
.sheet__meta { color: var(--text-dim); font-size: 14px; }
.sheet--portrait .sheet__paper { aspect-ratio: 3 / 4; padding: 8px; }
.grid--letters { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.grid--letters .sheet__title { font-size: 18px; }
.ws-group + .ws-group { margin-top: 56px; }
.ws-group__head { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.ws-group__intro { color: var(--text-soft); font-size: 17px; line-height: 1.5; max-width: 720px; margin-top: 10px; text-wrap: pretty; }
.ws-group__all { font-size: 17px; padding: 12px 24px; }
.sheet__btn { margin-top: 14px; align-self: flex-start; background: var(--sun); color: var(--sun-ink); padding: 10px 22px; font-size: 16px; }
.sheet__btn:hover { background: var(--sun-hover); color: var(--sun-ink); }

/* Friend cards */
.friend {
  background: var(--surface); border-radius: 24px; padding: 20px 12px 18px; text-align: center;
  border: 2px solid transparent; transition: border-color .15s ease;
}
.friend:hover { border-color: #2a3a63; }
.friend__portrait {
  width: 110px; height: 110px; border-radius: 50%; border: 3px solid; background: var(--portrait-bg);
  margin: 0 auto 12px; overflow: hidden;
}
.friend__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pill {
  display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 4px 16px; border-radius: 16px;
}

/* Parents CTA */
.parents {
  background: var(--sun); color: var(--sun-ink); border-radius: 32px; padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.parents__text { max-width: 620px; }
.parents__title { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.1; margin-bottom: 8px; }
.parents__body { font-size: 17px; line-height: 1.5; }
.btn-dark {
  background: var(--bg); color: var(--text); font-family: var(--font-display); font-weight: 700;
  font-size: 18px; padding: 14px 30px; border-radius: 28px;
}
.btn-dark:hover { color: var(--text); background: #0e1c3d; }
.parents__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-dark--outline { background: transparent; color: var(--sun-ink); border: 2px solid var(--sun-ink); padding: 12px 28px; }
.btn-dark--outline:hover { background: rgba(7, 16, 35, 0.1); color: var(--sun-ink); }

/* Page headings */
.page-title { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1.1; }
.page-sub { font-size: 18px; color: var(--text-muted); margin: 8px 0 28px; }
.page-title--center, .page-sub--center { text-align: center; }
.page-sub--center { margin-bottom: 36px; }

/* Friends page */
.picker { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.picker__item {
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden; cursor: pointer; padding: 0;
  background: var(--portrait-bg); border: 4px solid transparent;
}
.picker__item img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.profile {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; align-items: center;
  background: var(--surface); border-radius: 32px; padding: 40px; border: 3px solid;
}
.profile__art {
  background: var(--portrait-bg); border-radius: 24px; aspect-ratio: 1;
  display: flex; align-items: end; justify-content: center; overflow: hidden;
}
.profile__art img { max-width: 90%; max-height: 95%; object-fit: contain; }
.profile__bn { display: inline-block; font-weight: 700; font-size: 18px; padding: 4px 18px; border-radius: 16px; margin-bottom: 12px; }
.profile__name { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; margin-bottom: 12px; }
.profile__trait { font-size: 20px; color: var(--text-soft); line-height: 1.5; margin-bottom: 20px; }
.profile__label { font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--label); margin-bottom: 8px; }
.profile__loves { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin-bottom: 28px; }
.profile__btn { padding: 14px 28px; white-space: normal; }

/* Videos page */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filter {
  padding: 10px 20px; border-radius: 22px; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  background: var(--surface); color: var(--text-soft);
}
.filter.is-active { background: var(--sun); color: var(--sun-ink); }

/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  max-width: 1280px; margin: 0 auto; padding: 28px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--footer); font-size: 14px;
}
.footer__tagline { font-size: 13px; margin-top: 4px; }

/* Small screens: keep the 32px design gutter on desktop, tighten on phones */
/* Phones/small tablets: logo + Subscribe on top, the four links in a full-width row below */
@media (max-width: 820px) {
  .nav__inner { gap: 10px 12px; }
  .btn-subscribe { margin-left: auto; }
  .nav__links { order: 2; flex-basis: 100%; margin-left: 0; justify-content: space-between; }
}

@media (max-width: 600px) {
  .nav__inner, .section, .footer__inner { padding-left: 16px; padding-right: 16px; }
  .section--page { padding-left: 16px; padding-right: 16px; }
  .hero__text { padding: 28px; }
  .hero__art { flex-basis: 100%; min-height: 0; }
  .parents { padding: 32px 28px; }
  .profile { padding: 24px; grid-template-columns: 1fr; }
  .profile__name { font-size: 44px; }
  .nav__link { padding: 10px 10px; }
}

@media (max-width: 600px) {
  .grid--letters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid--letters .sheet { padding: 8px 8px 14px; border-radius: 18px; }
  .grid--letters .sheet__body { padding: 10px 4px 0; }
  .grid--letters .sheet__title { font-size: 16px; }
  .grid--letters .sheet__meta { font-size: 13px; }
  .grid--letters .sheet__btn { padding: 8px 14px; font-size: 14px; margin-top: 10px; }
}

@media (max-width: 400px) {
  .nav__link { padding: 8px 8px; font-size: 15px; }
  .btn-subscribe { padding: 10px 14px; }
  .btn-subscribe__label { display: none; }
  .brand__tagline { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .lift, .lift:hover { transition: none; transform: none; }
}
