/* =========================
   UI ENHANCEMENT KIT v1
   Safe UX layer (no DOM changes)
   ========================= */

:root {
  --ui-radius: 12px;
  --ui-shadow: 0 6px 20px rgba(0,0,0,0.08);
  --ui-accent: #6c5ce7;
  --ui-font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* Base typography smoothing */
body {
  font-family: var(--ui-font);
  line-height: 1.55;
  letter-spacing: 0.2px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Links & buttons feel modern but stable */
a, button {
  border-radius: var(--ui-radius);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* Hover micro-interaction */
a:hover, button:hover {
  transform: translateY(-1px);
  box-shadow: var(--ui-shadow);
}

/* Active press feedback */
a:active, button:active {
  transform: scale(0.98);
}

/* Focus visibility (important for accessibility + boomers) */
:focus-visible {
  outline: 3px solid var(--ui-accent);
  outline-offset: 2px;
}

/* Selection highlight */
::selection {
  background: var(--ui-accent);
  color: #fff;
}

/* Layout breathing room (non-invasive) */
p {
  margin-bottom: 0.85em;
}

/* Cards / sections soft elevation */
section, article, .card {
  border-radius: var(--ui-radius);
}

/* Fade-in animation (respect reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .ui-fade-in {
    animation: uiFadeIn 0.25s ease-out;
  }

  @keyframes uiFadeIn {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Mobile usability improvements */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

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

/* Dark mode (system-based, safe) */
@media (prefers-color-scheme: dark) {
  body {
    background: #111;
    color: #eee;
  }

  a, button {
    box-shadow: none;
  }

  :root {
    --ui-shadow: 0 6px 20px rgba(0,0,0,0.4);
  }
}