/* ─── Content protection + interaction hardening ─────────────────────────────
   Deterrents, not guarantees. Anything the browser renders has already been
   downloaded to the visitor's machine, so these measures stop casual saving
   (right-click, drag to desktop, long-press on iOS, print to PDF) and nothing
   more. The measures that actually matter are elsewhere: pages serve 2200px
   derivatives from images-web/, and the full-resolution originals are excluded
   from the deployment entirely via .vercelignore.
──────────────────────────────────────────────────────────────────────────── */

/* Media cannot be dragged out, long-pressed, or selected. */
img,
video,
canvas,
svg,
.project-image,
.frame-hero-bg,
.frame-image-inner,
.trio-figure,
.sel-figure,
.arch-thumb {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Text is not selectable by default. */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* …with deliberate exceptions. A portfolio exists to get the owner contacted,
   so anything a visitor legitimately needs to copy stays selectable. Removing
   these would mean nobody could copy the email address. */
.contact-link-value,
.about-email,
.aside-link,
.press-handle,
.footer-copy,
input,
textarea,
[href^="mailto:"],
.selectable,
.selectable * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* ── Accessibility and interaction fixes ──
   These run alongside the protection rules because disabling selection and
   context menus removes affordances, so the remaining ones must be solid. */

/* Skip link, for keyboard and screen-reader users. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.85rem 1.25rem;
  background: #fff;
  color: #000;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* A visible focus ring everywhere. The custom cursor hides the system cursor,
   so keyboard users need an unambiguous focus state. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent, #c8b89a);
  outline-offset: 3px;
}

/* The custom cursor is decorative. Hide it from anyone on a touch device or
   any pointer that is not fine, where it lags behind the finger and is noise. */
@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-follower {
    display: none !important;
  }
  /* restore the real cursor that style.css hides */
  html, body, a, button { cursor: auto !important; }
}

/* Respect a reduced-motion preference across the whole site. */
@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;
  }
  .cursor,
  .cursor-follower { display: none !important; }
}

/* Print: the imagery is the work, so it does not go to paper or print-to-PDF. */
@media print {
  img,
  video,
  canvas,
  .project-image,
  .frame-hero-bg,
  .frame-image-inner,
  .trio-figure,
  .sel-figure,
  .arch-thumb,
  #bg-canvas {
    display: none !important;
  }
  body::before {
    content: "Images omitted. Please view the work at emanueledipaola.studio";
    display: block;
    font-family: monospace;
    font-size: 11pt;
    padding: 1rem 0;
  }
  body { background: #fff !important; color: #000 !important; }
}
