/* Better by Design AI: motion layer.
   Purpose: guide attention one chunk at a time, give clear feedback on every tap,
   and show where you are on a long page. Everything that moves is skipped for
   visitors who turn on "reduce motion" in their system settings. */

/* A clear, consistent focus ring on every interactive element (always on). */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #B8922A;
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Hero entrance: the headline first, then each line beneath it. */
  @keyframes m-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
  html.m-js h1 { animation: m-rise .7s cubic-bezier(.2,.7,.2,1) both; }
  html.m-js h1 ~ * { animation: m-rise .7s cubic-bezier(.2,.7,.2,1) .32s both; }
  html.m-js h1 + * { animation-delay: .12s; }
  html.m-js h1 + * + * { animation-delay: .22s; }

  /* Scroll reveal: sections and cards fade up as they arrive, staggered within a group. */
  .m-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--m-i, 0) * 90ms);
    will-change: opacity, transform;
  }
  .m-reveal.m-in { opacity: 1; transform: none; will-change: auto; }

  /* Tap and hover feedback on buttons and cards. */
  .m-lift { transition: transform .22s ease, box-shadow .22s ease; }
  .m-lift:hover { transform: translateY(-3px); }
  .m-lift:active { transform: translateY(0) scale(.985); transition-duration: .08s; }

  /* Reading progress: a thin gold line across the top that fills as you scroll. */
  #m-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, #B8922A, #D4AA4A);
    z-index: 9999; pointer-events: none;
    transition: width .1s linear;
  }

  .m-count { font-variant-numeric: tabular-nums; }
}

@media print {
  .m-reveal { opacity: 1 !important; transform: none !important; }
  #m-progress { display: none; }
}
