/* ============================================================
   base.css — universal primitives shared by every page
   (both the Inter "brand" idiom and the serif "manuscript" idiom)

   Holds only what is truly idiom-agnostic:
   reset · design tokens · custom cursors · selection · a11y.
   Brand pages additionally load brand.css on top of this.
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* type */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: var(--font-sans);
  --font-serif: 'Times New Roman', Times, serif;

  /* safe-area insets (notch / dynamic island) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* custom cursors — value carries its own native fallback */
  --cur-default: url('cursors/Pointer.cur'), default;
  --cur-link: url('cursors/Link.cur'), pointer;
  --cur-text: url('cursors/Text.cur'), text;
  --cur-grab: url('cursors/Pointer.cur'), grab;
  --cur-grabbing: url('cursors/Grabbing.cur'), grabbing;
}

html { cursor: var(--cur-default); }
a, button { cursor: var(--cur-link); }

::selection { background: #000; color: #fff; }

/* Keyboard focus only — invisible for mouse/touch, adapts to the
   current text colour so it works on light and dark pages alike. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* Respect users who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
