/* ===========================================================================
   Aegis by Rainmkr on the RAINMKR V7 frame — the parts every page shares.

   Loaded by the public site (with site.css) and the signed-in app (with
   app/rainmkr.css). V7 is rainmkr-web-v2-source's system (10 Oct 2026):
   graphite canvas with a quiet mineral grain, onyx information surfaces,
   bone ink, and the Wix Madefor / Azeret Mono type law. Aegis keeps one
   product accent, cyan, which in V7 also leads eyebrows, focus and links.

   The brand kit in ./brand/ is a byte-identical stamp of the V7 canon
   (brand.css + five TTFs + the outlined logo SVGs). Never edit it here.

   The ambient flow (the WebGL field and the drifting colour fields) is
   retired in V7. ui.js no longer builds or starts it; the rules below keep
   any stray stage element hidden, and flow-renderer.js / flow-worker.js stay
   on disk so it can be restored.

   Presentation only. Nothing here changes what a control does.
   =========================================================================== */

@import url('/assets/rainmkr/brand/brand.css');

:root {
  /* brand.css carries the canon (--rk-graphite, --rk-onyx, --rk-bone, the
     spectrum, the inks on bone, --rk-display / --rk-text / --rk-mono).
     These are the frame's working tints, as rainmkr-web-v2-source names them. */
  --rk-black: var(--rk-onyx);
  --rk-bone-soft: rgb(244 241 236 / 0.78);
  --rk-bone-dim: rgb(244 241 236 / 0.62);
  --rk-hairline: rgb(244 241 236 / 0.11);
  --rk-hairline-strong: rgb(244 241 236 / 0.22);
  --rk-panel: rgb(3 3 4 / 0.8);
  --rk-panel-strong: rgb(3 3 4 / 0.9);
  /* Graphite glass, the V7 marketing card. */
  --rk-glass: linear-gradient(165deg, rgb(31 26 37 / 0.6), rgb(14 13 19 / 0.6));
  --rk-glass-edge: inset 0 1px 0 rgb(244 241 236 / 0.05);

  /* The quiet V7 CTA: a violet tint, never a filled pill. */
  --rk-cta-bg: rgb(200 98 250 / 0.1);
  --rk-cta-bg-hover: rgb(200 98 250 / 0.18);
  --rk-cta-ink: #dcc4e8;
  --rk-cta-line: inset 0 0 0 1px rgb(200 98 250 / 0.38);
  --rk-cta-line-hover: inset 0 0 0 1px rgb(200 98 250 / 0.6);

  --rk-ease: cubic-bezier(0.16, 1, 0.3, 1);

  --rk-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: dark;
}

/* Only the real V7 cuts ever render: a weight the kit does not ship (Azeret
   Mono bold, say) falls to the nearest real one instead of a faux bold. */
html { background: var(--rk-graphite); font-synthesis: none; }
::selection { background: rgb(250 84 145 / 0.45); color: var(--rk-bone); }

/* ------------------------------------------------------- the V7 canvas */

/* Solid graphite with a quiet, neutral mineral grain, and nothing else.
   Content is lifted above it by site.css and app/rainmkr.css. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image: var(--rk-grain);
  background-repeat: repeat;
  background-size: 180px 180px;
  opacity: 0.045;
}

/* Retired ambient layers (see the header): dormant, never shown. */
.flow-canvas, .flow-grain, .living { display: none !important; }

/* ------------------------------------------------------------ cursor */

.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input:not([type='radio']):not([type='checkbox']):not([type='file']),
.has-cursor textarea { cursor: text !important; }
.has-cursor select { cursor: pointer !important; }

.cursor { position: fixed; inset: 0; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cursor.is-visible { opacity: 1; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; will-change: transform; }
.cursor__dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: var(--rk-bone);
  transition: opacity 0.25s, background-color 0.25s;
}
.cursor__ring { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor__ring svg { width: 100%; height: 100%; overflow: visible; transition: transform 0.5s var(--rk-ease), opacity 0.3s; }
.cursor__ring circle { fill: none; stroke: rgb(244 241 236 / 0.55); stroke-width: 1; vector-effect: non-scaling-stroke; transition: stroke 0.3s, fill 0.3s; }
/* Aegis's accent: over anything clickable the ring takes its cyan. */
.cursor[data-state='link'] .cursor__ring svg { transform: scale(1.55); }
.cursor[data-state='link'] .cursor__ring circle { stroke: var(--rk-cyan); fill: rgb(59 198 255 / 0.08); }
.cursor[data-state='link'] .cursor__dot { opacity: 0; }
.cursor[data-state='text'] .cursor__ring svg { transform: scale(0.4); opacity: 0; }
.cursor[data-state='text'] .cursor__dot { opacity: 0; }
.cursor.is-pressed .cursor__ring svg { transform: scale(0.82); }

/* ------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
  .cursor__ring svg { transition: none; }
}

@media print {
  body::before, .cursor { display: none !important; }
}
