:root {
  --dur: 520ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------- Page transitions (modal-safe) ---------------- */
body {
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  overflow-x: hidden;
}

body.loaded {
  opacity: 1;
}

body.is-leaving {
  opacity: 0;
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body,
  body.loaded,
  body.is-leaving {
    transition: none;
    opacity: 1;
  }
}

/* ---------------- Mobile baseline (global) ---------------- */
* {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Better typography + touch targets on small screens */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  a,
  button {
    min-height: 44px;
  }
}