/* ============================================================
   RJ Motion Gallery — Shared styles for all cursor demos
   Mirrors the RJ Web Faces Gallery design language so both
   sites belong to the same brand family.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;

  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-400: #94a3b8;
  --paper: #f8fafc;
  --card: #ffffff;
  --brand-600: #4f46e5;
  --brand-500: #6366f1;
  --brand-50: #eef2ff;
  --green-600: #059669;
  --green-50: #ecfdf5;
  --rose-500: #f43f5e;
  --amber-500: #f59e0b;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-pop: 0 24px 60px -20px rgba(79, 70, 229, .35);

  --line: #eef2f7;
  --line-strong: #e2e8f0;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display { font-family: var(--font-display); }

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; }

::selection { background: var(--brand-500); color: #fff; }

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 3px; border-radius: 4px; }

/* ---------- Monospace micro-label (shared visual language) ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Generic layout helpers ---------- */
.section { padding: 84px 24px; position: relative; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; }

/* ---------- Shared form controls (used by any demo with controls) ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 13.5px; font-weight: 600; color: var(--ink-600); letter-spacing: .01em;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: var(--radius-md);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff; padding: 13px 22px;
  box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .55);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--ink-600); padding: 12px 18px;
  border: 1.5px solid #e2e8f0;
}
.btn-ghost:hover { border-color: var(--brand-500); color: var(--brand-600); }

/* ---------- Toasts ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink-900); color: #fff; padding: 12px 22px;
  border-radius: 999px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 1000; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .35);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Shared reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion: calm everything ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001s !important; animation-iteration-count: 1 !important; }
}