/* ============================================================
   BOOKSBYAMA — home.css
   Home page section overrides — compact, tight spacing.
   Depends on: variables.css, style.css (loaded first)
============================================================ */

/* ── Tighter section padding ─────────────────────────────── */
.home-pad { padding: 56px 0; }
.home-pad--sm { padding: 44px 0; }

/* Shared compact section header */
.home-hdr {
  text-align: center; margin-bottom: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.home-hdr .section-heading { font-size: clamp(1.4rem, 2.3vw, 1.9rem); margin: 0; }
.home-hdr .section-sub     { font-size: .88rem; max-width: 480px; margin: 0; }

/* ─────────────────────────────────────────────────────────
   WHY BOOKSBYAMA
───────────────────────────────────────────────────────── */
.why2 { background: var(--surface); }
.why2__inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
}

/* Left: compact gradient card */
.why2__vis { position: relative; display: flex; justify-content: center; }
.why2__card {
  width: 100%; max-width: 340px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border-radius: var(--radius-xl); padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.why2__card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 8%, rgba(255,255,255,.1), transparent 55%);
  pointer-events: none;
}
.why2__emoji  { font-size: 2.4rem; }
.why2__title  { font-family: var(--font-head); font-size: .9rem; font-weight: 700; color: #fff; }
.why2__sub    { font-size: .68rem; color: rgba(255,255,255,.6); }
.why2__stats  { display: flex; gap: 6px; width: 100%; margin-top: 2px; }
.why2__stat   {
  flex: 1; background: rgba(255,255,255,.13); border-radius: var(--radius-sm);
  padding: 7px 8px; text-align: center;
}
.why2__stat span { display: block; font-family: var(--font-head); font-weight: 700; color: #fff; font-size: .85rem; }
.why2__stat em   { display: block; font-style: normal; font-size: .56rem; color: rgba(255,255,255,.5); margin-top: 1px; }
.why2__books  { display: flex; gap: 5px; font-size: 1.1rem; }

.why2__badge {
  position: absolute; background: #fff;
  border-radius: var(--radius-md); box-shadow: var(--shadow-float);
  padding: 6px 10px; display: flex; align-items: center; gap: 6px;
  z-index: 5; font-size: 1rem;
}
.why2__badge div   { display: flex; flex-direction: column; }
.why2__badge strong { font-size: .62rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-head); }
.why2__badge em    { font-style: normal; font-size: .56rem; color: var(--text-light); }
.why2__badge--1 { bottom: -10px; right: -10px; animation: float 3.5s ease-in-out .4s infinite; }
.why2__badge--2 { top: -10px;    left: -10px;  animation: float 4.5s ease-in-out .9s infinite; }

/* Right: text + highlights */
.why2__text { display: flex; flex-direction: column; gap: 14px; }
.why2__rows { display: flex; flex-direction: column; gap: 7px; }
.why2__row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 13px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-md); transition: var(--transition);
}
.why2__row:hover { border-color: var(--purple-tint); box-shadow: var(--shadow-xs); transform: translateX(3px); }
.why2__row-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.why2__row h3 { font-size: .84rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.why2__row p  { font-size: .77rem; color: var(--text-muted); line-height: 1.5; }

/* ─────────────────────────────────────────────────────────
   KEY FEATURES
───────────────────────────────────────────────────────── */
.hfeat { background: var(--bg); }
.hfeat__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.hfeat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: var(--transition);
}
.hfeat-card:hover { border-color: var(--purple-tint); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.hfeat-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.hfeat-card h3 { font-size: .84rem; font-weight: 700; color: var(--text-primary); }
.hfeat-card p  { font-size: .77rem; color: var(--text-muted); line-height: 1.5; }

/* ─────────────────────────────────────────────────────────
   HOW IT WORKS
───────────────────────────────────────────────────────── */
.hhow { background: var(--surface); }
.hhow__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; position: relative;
}
/* connecting line */
.hhow__grid::before {
  content: '';
  position: absolute; top: 26px;
  left: 12.5%; width: 75%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-tint) 10%, var(--purple) 50%, var(--purple-tint) 90%, transparent);
  z-index: 0;
}
.hhow-step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px; padding: 0 10px;
  position: relative; z-index: 1;
}
.hhow-step__icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--purple-tint);
  box-shadow: 0 2px 12px rgba(99,93,169,.12);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  transition: var(--transition);
}
.hhow-step:hover .hhow-step__icon {
  border-color: var(--purple); box-shadow: 0 4px 20px rgba(99,93,169,.24); transform: scale(1.08);
}
.hhow-step__num {
  font-size: .6rem; font-weight: 700; color: var(--purple);
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--purple-tint); padding: 2px 8px; border-radius: var(--radius-full);
}
.hhow-step h3 { font-size: .84rem; font-weight: 700; color: var(--text-primary); }
.hhow-step p  { font-size: .76rem; color: var(--text-muted); line-height: 1.5; }

/* ─────────────────────────────────────────────────────────
   APP SHOWCASE
───────────────────────────────────────────────────────── */
.hshowcase {
  background: linear-gradient(140deg, var(--purple-dark), var(--purple) 55%, #4a47a3);
  position: relative; overflow: hidden;
}
.hshowcase__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hshowcase__orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.hshowcase__orb--1 { width: 360px; height: 360px; top: -100px; right: -80px; background: rgba(101,161,215,.2); }
.hshowcase__orb--2 { width: 300px; height: 300px; bottom: -80px; left: -60px;  background: rgba(255,201,59,.12); }
.hshowcase__phones {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 12px; flex-wrap: wrap; padding-bottom: 6px;
  position: relative; z-index: 2;
}
.hshowcase__phone { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.hshowcase__phone:nth-child(1) { transform: translateY(22px); }
.hshowcase__phone:nth-child(2) { transform: translateY(0); }
.hshowcase__phone:nth-child(3) { transform: translateY(18px); }
.hshowcase__phone:nth-child(4) { transform: translateY(32px); }
.hshowcase__phone:nth-child(1) .phone { animation: float 5s ease-in-out .2s  infinite; }
.hshowcase__phone:nth-child(2) .phone { animation: float 4s ease-in-out 0s   infinite; }
.hshowcase__phone:nth-child(3) .phone { animation: float 5s ease-in-out .8s  infinite; }
.hshowcase__phone:nth-child(4) .phone { animation: float 4s ease-in-out 1.2s infinite; }
.hshowcase__lbl {
  font-size: .65rem; font-weight: 600;
  color: rgba(255,255,255,.5); letter-spacing: .07em; text-transform: uppercase;
}
/* smaller phone sizes for showcase */
.hshowcase .phone--sm { width: 130px; height: 250px; }
.hshowcase .phone--md { width: 165px; height: 330px; }
.hshowcase .phone--lg { width: 200px; height: 400px; }

/* ─────────────────────────────────────────────────────────
   TESTIMONIALS
───────────────────────────────────────────────────────── */
.htesti { background: var(--surface); }
.htesti__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.htcard {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: var(--transition);
}
.htcard:hover { border-color: var(--purple-tint); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.htcard--feat {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark)); border: none;
}
.htcard__stars { font-size: .85rem; color: var(--gold); letter-spacing: 1px; }
.htcard--feat .htcard__stars { color: var(--gold); }
.htcard__quote {
  font-size: .8rem; color: var(--text-muted); line-height: 1.65;
  font-style: italic; flex: 1;
}
.htcard__quote::before { content: '"'; }
.htcard__quote::after  { content: '"'; }
.htcard--feat .htcard__quote { color: rgba(255,255,255,.82); }
.htcard__author { display: flex; align-items: center; gap: 10px; }
.htcard__avatar {
  font-size: 1.5rem; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-tint); border-radius: 50%; flex-shrink: 0;
}
.htcard--feat .htcard__avatar { background: rgba(255,255,255,.18); }
.htcard__author strong { display: block; font-size: .8rem; font-weight: 600; color: var(--text-primary); }
.htcard--feat .htcard__author strong { color: #fff; }
.htcard__author span { display: block; font-size: .7rem; color: var(--text-light); margin-top: 1px; }
.htcard--feat .htcard__author span { color: rgba(255,255,255,.55); }

/* ─────────────────────────────────────────────────────────
   DOWNLOAD CTA
───────────────────────────────────────────────────────── */
.hdl {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple) 60%, #4a47a3);
  position: relative; overflow: hidden;
}
.hdl__bg { position: absolute; inset: 0; pointer-events: none; }
.hdl__orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.hdl__orb--1 { width: 380px; height: 380px; top: -100px; right: -80px; background: rgba(101,161,215,.2); }
.hdl__orb--2 { width: 300px; height: 300px; bottom: -80px; left: -60px;  background: rgba(255,201,59,.15); }
.hdl__inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: 48px; align-items: center;
  position: relative; z-index: 2;
}
.hdl__text { display: flex; flex-direction: column; gap: 14px; }
.hdl__heading {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800;
  color: #fff; line-height: 1.15; letter-spacing: -.03em;
}
.hdl__sub { font-size: .88rem; color: rgba(255,255,255,.72); line-height: 1.7; max-width: 440px; }
.hdl__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hdl__qr { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.hdl__qr-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hdl__qr-item img,
.hdl__qr-item .qr-placeholder { width: 76px; height: 76px; }
.hdl__qr-item p { font-size: .67rem; color: rgba(255,255,255,.5); text-align: center; }
.hdl__visual {
  display: flex; align-items: center; justify-content: center;
  animation: float 5s ease-in-out infinite;
  flex-shrink: 0;
}
.hdl__floats { position: absolute; font-size: 1.6rem; animation: float 4s ease-in-out infinite; }
.hdl__floats--1 { top: 12%; right: 6%;  animation-delay: .2s; }
.hdl__floats--2 { bottom: 18%; left: 4%; animation-delay: .9s; }

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .why2__inner { grid-template-columns: 1fr; gap: 32px; }
  .why2__vis   { order: -1; }
  .why2__text  { align-items: center; text-align: center; }
  .why2__rows  { width: 100%; max-width: 520px; }
  .hfeat__grid { grid-template-columns: repeat(2, 1fr); }
  .hhow__grid  { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .hhow__grid::before { display: none; }
  .htesti__grid { grid-template-columns: repeat(2, 1fr); }
  .hdl__inner  { grid-template-columns: 1fr; gap: 0; }
  .hdl__visual { display: none; }
  .hdl__text   { align-items: center; text-align: center; }
  .hdl__btns   { justify-content: center; }
  .hdl__qr     { justify-content: center; }
}
@media (max-width: 768px) {
  .home-pad    { padding: 40px 0; }
  .hfeat__grid { grid-template-columns: 1fr; }
  .hhow__grid  { grid-template-columns: 1fr 1fr; }
  .htesti__grid { grid-template-columns: 1fr; }
  .hshowcase__phones { gap: 8px; }
  .hshowcase .phone--sm { width: 110px; height: 210px; }
  .hshowcase .phone--md { width: 140px; height: 280px; }
  .hshowcase .phone--lg { width: 170px; height: 340px; }
}
@media (max-width: 480px) {
  .hhow__grid  { grid-template-columns: 1fr; }
  .hdl__btns   { flex-direction: column; align-items: center; }
}
