/* Navigation and flow refinements: tighter section rhythm, quicker reveals,
   a lesson viewer that fits the screen, and a back-to-top control. */

/* --- Section rhythm: remove the large gaps between sections --------------- */
.section { padding: 52px 0; }
.section-heading { margin-bottom: 26px; }
.lesson-demo-section { padding: 52px 0 56px; }
.lesson-demo-heading { margin-bottom: 20px; }
.credibility-section { padding: 48px 0 52px; }
.trust-strip { margin: 4px 0 52px; }

@media (max-width: 760px) {
  .section { padding: 40px 0; }
  .lesson-demo-section { padding: 40px 0 44px; }
  .credibility-section { padding: 38px 0 42px; }
  .trust-strip { margin-bottom: 40px; }
}

/* --- Reveals: shorter, subtler entrance so content never looks missing --- */
.js [data-reveal].is-visible { animation-duration: 480ms; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* --- Lesson viewer: use the full content width ---------------------------- */
@media (min-width: 761px) {
  .lesson-frame-stage { min-height: 420px; }
}

/* --- Back to top ---------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(22, 104, 216, 0.25);
  border-radius: 50%;
  color: #1668d8;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 37, 64, 0.16);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, background 150ms ease;
}
.back-to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: #eef5ff; }
.back-to-top:focus-visible { outline: 3px solid #1668d8; outline-offset: 2px; }
body.mobile-lesson-open .back-to-top { display: none; }
@media print { .back-to-top { display: none; } }

/* --- Small screens: keep the preview badge from covering thumbnail art --- */
@media (max-width: 520px) {
  .preview-badge { left: 10px; top: 10px; padding: 5px 8px; font-size: 8px; }
}
