/* =============================
   Learning Fast – main.css
   ============================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

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

:root {
  --primary:   #4f6ef7;
  --primary-dark: #3a55d4;
  --accent:    #f9a825;
  --bg:        #f5f7ff;
  --surface:   #ffffff;
  --text:      #1e1e2e;
  --muted:     #6b7280;
  --radius:    14px;
  --shadow:    0 4px 24px rgba(79,110,247,.13);
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 68px;
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.navbar__logo img {
  height: 52px;
  width: auto;
  display: block;
}

.navbar__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.navbar__links a {
  font-weight: 600;
  font-size: .95rem;
  color: var(--muted);
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========== HERO ========== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  background: linear-gradient(135deg, #eef1ff 0%, #f5f7ff 60%, #fff8e7 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(79,110,247,.12) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}

.hero__logo-big {
  width: 420px;
  max-width: 80vw;
  height: auto;
  margin-bottom: 1.4rem;
  filter: drop-shadow(0 8px 24px rgba(79,110,247,.22));
  animation: heroBounce 3s ease-in-out infinite;
}

@keyframes heroBounce {
  0%, 100% { transform: translateY(0); }
  50%        { transform: translateY(-10px); }
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  max-width: 700px;
}

.hero__title span { color: var(--primary); }

.hero__subtitle {
  margin-top: 1.1rem;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.8rem;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: none;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(79,110,247,.35);
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(79,110,247,.45);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ========== SECTIONS ========== */
section { padding: 5rem 2.5rem; }

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .5rem;
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
}

.section__subtitle {
  margin-top: .6rem;
  color: var(--muted);
  font-size: 1rem;
}

/* ========== BOOKS GRID ========== */
.books { background: var(--surface); }

.books__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.8rem;
  max-width: 1100px;
  margin: 0 auto;
}

.book-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.book-card__cover {
  width: 90px; height: 120px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.book-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}

.book-card__meta {
  font-size: .8rem;
  color: var(--muted);
}

.book-card__tag {
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: rgba(79,110,247,.1);
  color: var(--primary);
}

/* Cover colour variants */
.cover--blue   { background: linear-gradient(135deg, #4f6ef7, #7c9aff); }
.cover--green  { background: linear-gradient(135deg, #22c55e, #86efac); }
.cover--orange { background: linear-gradient(135deg, #f97316, #fdba74); }
.cover--purple { background: linear-gradient(135deg, #a855f7, #d8b4fe); }
.cover--red    { background: linear-gradient(135deg, #ef4444, #fca5a5); }
.cover--teal   { background: linear-gradient(135deg, #14b8a6, #99f6e4); }

/* ========== FOOTER ========== */
.footer {
  margin-top: auto;
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 2.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
}

.footer__logo img {
  height: 44px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.footer__links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__links a {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}

.footer__links a:hover { color: #fff; }

.footer__copy {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .navbar { padding: 0 1.2rem; }
  .navbar__links { gap: 1.2rem; }
  section { padding: 3.5rem 1.2rem; }
}
