/* =============================================
   Home page (Views/Home/Index.cshtml)
   Light, airy landing (also the public page for logged-out visitors): hero +
   cover stack, then three alternating feature segments (eReader / Publishers / Schools).
   ============================================= */

.hm {
  --hm-ink: var(--text);
  --hm-muted: var(--text-muted);
  --hm-orange: var(--accent);
  --hm-orange-deep: var(--gold-deep);
  --hm-tint: var(--accent-tint);
  --hm-soft: #fbf8f1;
  --hm-radius: 22px;
  font-family: 'Montserrat', 'Inter', sans-serif;
  color: var(--hm-ink);
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 1rem;
}

.hm h1, .hm h2, .hm h3, .hm h5 { font-family: 'Montserrat', 'Inter', sans-serif; }

/* ---- Shared bits ---- */
.hm-eyebrow {
  display: inline-block;
  font-size: 2.78rem;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--hm-orange-deep);
  margin-bottom: .6rem;
}
.hm-title {
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.5px;
  margin-bottom: 1rem;
}
.hm-lead { color: var(--hm-muted); font-size: 1rem; line-height: 1.7; max-width: 560px; }

.hm-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600; font-size: .92rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.hm-btn:hover { transform: translateY(-2px); }
.hm-btn-primary { background: var(--hm-orange); color: var(--accent-ink); box-shadow: 0 8px 22px rgba(238,145,0,.32); }
.hm-btn-primary:hover { background: #ff9f0f; color: var(--accent-ink); box-shadow: 0 12px 28px rgba(238,145,0,.4); }
.hm-btn-ghost { background: #fff; color: var(--hm-ink); border-color: var(--border); }
.hm-btn-ghost:hover { border-color: var(--hm-orange); color: var(--hm-ink); }


/* ---- Hero ---- */
.hm-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem) clamp(.25rem, 3vw, 2.5rem);
}
.hm-hero-title {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.2px;
  margin-bottom: 1.25rem;
}
.hm-hl { color: var(--hm-orange-deep); white-space: nowrap; }
.hm-hero-lead { font-size: 1.08rem; line-height: 1.7; color: var(--hm-muted); max-width: 520px; }

.hm-platforms {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
  margin-top: 2.25rem; color: var(--hm-ink); font-size: .85rem; font-weight: 500;
}
.hm-platforms i { color: var(--hm-muted); margin-right: .25rem; }
.hm-platforms-label { color: var(--hm-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }

/* Cover fan — five example covers, centre one on top */
.hm-stack { position: relative; height: 400px; max-width: 540px; margin: 0 auto; }
.hm-cover {
  position: absolute; top: 50%; left: 50%;
  width: 170px; aspect-ratio: 141 / 217;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden; background: #fff;
  box-shadow: 0 24px 50px rgba(29,29,27,.24), inset 6px 0 10px -6px rgba(0,0,0,.25);
  transition: transform .45s ease;
}
.hm-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-cover-0 { transform: translate(-50%, -50%) translateX(-190px) rotate(-14deg) scale(.78); z-index: 1; }
.hm-cover-1 { transform: translate(-50%, -50%) translateX(-100px) rotate(-7deg) scale(.9); z-index: 2; }
.hm-cover-2 { transform: translate(-50%, -50%) scale(1.06); z-index: 3; }
.hm-cover-3 { transform: translate(-50%, -50%) translateX(100px) rotate(7deg) scale(.9); z-index: 2; }
.hm-cover-4 { transform: translate(-50%, -50%) translateX(190px) rotate(14deg) scale(.78); z-index: 1; }
.hm-stack:hover .hm-cover-0 { transform: translate(-50%, -50%) translateX(-212px) rotate(-17deg) scale(.78); }
.hm-stack:hover .hm-cover-1 { transform: translate(-50%, -50%) translateX(-112px) rotate(-9deg) scale(.9); }
.hm-stack:hover .hm-cover-2 { transform: translate(-50%, -54%) scale(1.09); }
.hm-stack:hover .hm-cover-3 { transform: translate(-50%, -50%) translateX(112px) rotate(9deg) scale(.9); }
.hm-stack:hover .hm-cover-4 { transform: translate(-50%, -50%) translateX(212px) rotate(17deg) scale(.78); }
.hm-stack-shadow {
  position: absolute; left: 10%; right: 10%; bottom: 22px; height: 26px;
  background: radial-gradient(ellipse at center, rgba(29,29,27,.25), transparent 70%);
}

.hm-float {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border-radius: 999px;
  padding: .55rem 1rem; font-size: .8rem; font-weight: 600;
  box-shadow: 0 10px 30px rgba(29,29,27,.14);
  animation: hmBob 5s ease-in-out infinite;
}
.hm-float i { color: var(--hm-orange); }
.hm-float-1 { left: 0; bottom: 60px; }
.hm-float-2 { right: 0; top: 36px; animation-delay: -2.5s; }
@keyframes hmBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---- Feature segments ---- */
.hm-seg { padding: clamp(2rem, 5vw, 4rem) clamp(.25rem, 3vw, 2.5rem); margin: 1.5rem 0; scroll-margin-top: 90px; }

.hm-checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.5rem; }
.hm-checks li { display: flex; gap: .8rem; align-items: flex-start; }
.hm-checks i {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-size: .9rem;
  background: var(--hm-tint); color: var(--hm-orange-deep);
}
.hm-checks strong { display: block; font-size: .92rem; font-weight: 600; margin-bottom: .1rem; }
.hm-checks span { display: block; font-size: .82rem; color: var(--hm-muted); line-height: 1.5; }

/* Visual panels */
.hm-visual {
  position: relative; border-radius: var(--hm-radius);
  padding: clamp(1.5rem, 4vw, 3rem);
  min-height: 360px; display: grid; place-items: center; grid-template-columns: minmax(0, 1fr);
}

.hm-device {
  width: 100%; max-width: 330px;
  background: #1d1d1b; padding: 10px; border-radius: 22px;
  box-shadow: 0 30px 60px rgba(29,29,27,.28);
  transform: rotate(-3deg);
  transition: transform .45s ease;
}
.hm-device img { width: 100%; display: block; border-radius: 14px; }
.hm-device-wide { max-width: 520px; padding: 8px; border-radius: 14px; transform: none; }
.hm-device-wide img { border-radius: 8px; }
.hm-visual:hover .hm-device { transform: rotate(0) translateY(-4px); }

.hm-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border-radius: 14px; padding: .65rem 1rem;
  font-size: .8rem; font-weight: 600;
  box-shadow: 0 12px 30px rgba(29,29,27,.16);
  animation: hmBob 6s ease-in-out infinite;
}
.hm-chip i { color: var(--hm-orange); }
.hm-chip-tl { top: 8%; left: 4%; }
.hm-chip-br { bottom: 8%; right: 4%; animation-delay: -3s; }
.hm-chip-tr { top: -16px; right: 6%; }
.hm-chip-bl { bottom: -16px; left: 6%; animation-delay: -3s; }

/* Publisher store-listing mock */
.hm-mock { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: .5rem 0 .75rem; border: 1px solid var(--border); box-shadow: 0 24px 50px rgba(29,29,27,.12); }
.hm-mock-head {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1.1rem .8rem; border-bottom: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--hm-muted); text-transform: uppercase; letter-spacing: 1px;
}
.hm-mock-dots { display: inline-flex; gap: 5px; }
.hm-mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e6e3da; }
.hm-mock-dots i:first-child { background: var(--hm-orange); }
.hm-mock-row { display: flex; align-items: center; gap: .9rem; padding: .75rem 1.1rem; }
.hm-mock-row + .hm-mock-row { border-top: 1px dashed var(--border); }
.hm-mock-cover { width: 42px; height: 65px; border-radius: 3px 6px 6px 3px; flex-shrink: 0; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.hm-mock-cover img { width: 100%; height: 100%; object-fit: cover; }
.hm-mock-text { flex: 1; min-width: 0; }
.hm-mock-text strong { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-mock-text small { color: var(--hm-muted); font-size: .72rem; }
.hm-mock-status { font-size: .72rem; font-weight: 600; color: var(--success); background: var(--success-tint); border-radius: 999px; padding: .25rem .65rem; white-space: nowrap; }

/* School report card */
.hm-report {
  position: absolute; right: 3%; bottom: -22px; z-index: 2;
  width: 190px; background: #fff; border-radius: 16px; padding: .9rem 1rem .7rem;
  box-shadow: 0 18px 40px rgba(29,29,27,.18);
  animation: hmBob 6s ease-in-out infinite;
}
.hm-report-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .72rem; color: var(--hm-muted); font-weight: 600; }
.hm-report-head strong { color: var(--success); font-size: .85rem; }
.hm-bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin: .7rem 0 .35rem; }
.hm-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--hm-tint); }
.hm-bars i:nth-child(6) { background: var(--hm-orange); }
.hm-report-foot { display: flex; justify-content: space-between; font-size: .65rem; color: var(--hm-muted); }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .hm-stack { height: 360px; }
  .hm-cover { width: 150px; }
  .hm-seg { padding-left: 0; padding-right: 0; }
}
@media (max-width: 575.98px) {
  .hm-eyebrow { font-size: 1.6rem; }
  .hm-stack { height: 280px; }
  .hm-cover { width: 118px; }
  .hm-cover-0 { transform: translate(-50%, -50%) translateX(-112px) rotate(-14deg) scale(.74); }
  .hm-cover-1 { transform: translate(-50%, -50%) translateX(-60px) rotate(-7deg) scale(.88); }
  .hm-cover-3 { transform: translate(-50%, -50%) translateX(60px) rotate(7deg) scale(.88); }
  .hm-cover-4 { transform: translate(-50%, -50%) translateX(112px) rotate(14deg) scale(.74); }
  .hm-float { font-size: .72rem; padding: .45rem .8rem; }
  .hm-checks { grid-template-columns: 1fr; }
  .hm-visual { min-height: 280px; }
  .hm-chip { font-size: .72rem; padding: .5rem .8rem; }
  .hm-report { width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-float, .hm-chip, .hm-report { animation: none; }
  .hm-cover, .hm-device { transition: none; }
}
