/**
 * Reset, page defaults, shared animations and accessibility rules.
 */

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: -0.006em;
  font-feature-settings: 'ss01', 'cv11';
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--accent-glow); }

/* ============ Shared animations ============ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
}
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes breathe { from { opacity: 0.45; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .copy.is-copied .copy__check path, .toast.show .toast__icon path { stroke-dashoffset: 0; }
}

/* ============ Theme reveal ============ */
.theme-swap *, .theme-swap *::before, .theme-swap *::after, .theme-swap body { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
